/**
 * JamboQR UI Components Styles
 * Comprehensive styling for all reusable components
 */

/* ============================================================================
   Modal / Dialog
   ========================================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
    margin: 1rem;
}

.modal-small { max-width: 400px; width: 100%; }
.modal-medium { max-width: 600px; width: 100%; }
.modal-large { max-width: 800px; width: 100%; }
.modal-xlarge { max-width: 1200px; width: 100%; }

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ============================================================================
   Toast Notifications
   ========================================================================= */

.toast-container {
    position: fixed;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    /* 1rem de aire MÁS lo que ocupe la barra del sistema de ese lado. Con el
       dibujado de borde a borde de targetSdk 36, un aviso arriba salía debajo
       del reloj y uno abajo debajo de la barra de gestos — y un aviso que no se
       lee es un aviso que no existe. Los cuatro lados, porque la posición la
       elige quien llama a Toast. */
    padding: calc(1rem + env(safe-area-inset-top, 0px))
             calc(1rem + env(safe-area-inset-right, 0px))
             calc(1rem + env(safe-area-inset-bottom, 0px))
             calc(1rem + env(safe-area-inset-left, 0px));
}

.toast-top-right {
    top: 0;
    right: 0;
}

.toast-top-left {
    top: 0;
    left: 0;
}

.toast-bottom-right {
    bottom: 0;
    right: 0;
}

.toast-bottom-left {
    bottom: 0;
    left: 0;
}

.toast {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid;
}

/* Tinted backgrounds for the four toast variants. The text color is set on the
   .toast itself (via the canonical --color-text-primary, which IS redefined by
   the dark theme) so .toast-message can just `inherit` and stay readable in
   both modes without relying on the short-form alias chain. */
.toast-success {
    border-left-color: var(--color-secondary, #10b981);
    background-color: var(--success-bg, #ecfdf5);
}

.toast-error {
    border-left-color: var(--color-danger, #ef4444);
    background-color: var(--error-bg, #fef2f2);
}

.toast-warning {
    border-left-color: var(--color-warning, #f59e0b);
    background-color: var(--warning-bg, #fffbeb);
}

.toast-info {
    border-left-color: var(--color-info, #3b82f6);
    background-color: var(--info-bg, #eff6ff);
}

.toast {
    color: var(--color-text-primary);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.toast-icon {
    font-size: 1.25rem;
    font-weight: bold;
    flex-shrink: 0;
    color: inherit;
}

.toast-message {
    color: inherit;
    font-size: 0.875rem;
}

/* Explicit dark-theme overrides for toast backgrounds. The var(--error-bg)
   chain has been flaky in practice (the alias was getting resolved against
   the wrong scope), so we force the dark values via a higher-specificity
   selector that always wins.  Same shape as the dark block in variables.css. */
[data-theme="dark"] .toast-success { background-color: #064e3b; }
[data-theme="dark"] .toast-error   { background-color: #7f1d1d; }
[data-theme="dark"] .toast-warning { background-color: #78350f; }
[data-theme="dark"] .toast-info    { background-color: #1e3a8a; }

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   Form Components
   ========================================================================= */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group.has-error .form-control {
    border-color: var(--error-color, #ef4444);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    /* distinct surface + clear border so fields read as boxes on any card,
       in both light and dark themes (was invisible: undefined --border-color) */
    background-color: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control:disabled {
    background-color: var(--bg-secondary);
    opacity: 0.6;
    cursor: not-allowed;
}

.form-control.is-invalid {
    border-color: var(--error-color, #ef4444);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.form-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.875rem;
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 1;
}

.input-group .form-control {
    padding-left: 2.5rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-label {
    cursor: pointer;
    margin-bottom: 0;
    user-select: none;
}

/* ============================================================================
   Loading Spinner
   ========================================================================= */

.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color, #2563eb);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.spinner-small {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

.spinner-medium {
    width: 2rem;
    height: 2rem;
}

.spinner-large {
    width: 3rem;
    height: 3rem;
    border-width: 4px;
}

.spinner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.spinner-centered {
    justify-content: center;
    min-height: 200px;
}

.spinner-inline {
    flex-direction: row;
    display: inline-flex;
}

.spinner-message {
    font-size: 0.875rem;
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary, #e5e7eb) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    margin-bottom: 0.75rem;
    width: 60%;
}

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-wrapper {
    padding: 1rem 0;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-overlay-fullscreen {
    position: fixed;
    z-index: 999;
}

/* ============================================================================
   Star Rating
   ========================================================================= */

.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.star {
    color: var(--text-tertiary, #d1d5db);
    transition: color 0.2s;
}

.star-filled {
    color: var(--warning-color, #f59e0b);
}

.star-half {
    background: linear-gradient(90deg, var(--warning-color, #f59e0b) 50%, var(--text-tertiary, #d1d5db) 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star-interactive {
    cursor: pointer;
}

.star-interactive:hover {
    color: var(--warning-color, #f59e0b);
    transform: scale(1.1);
}

.star-small { font-size: 0.875rem; }
.star-medium { font-size: 1.25rem; }
.star-large { font-size: 1.75rem; }

.rating-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Rating Summary */
.rating-summary {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.rating-summary-header {
    text-align: center;
}

.rating-average {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.rating-count {
    font-size: 0.875rem;
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-breakdown-row {
    display: grid;
    grid-template-columns: 3rem 1fr 3rem;
    align-items: center;
    gap: 0.75rem;
}

.rating-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.rating-bar {
    height: 0.5rem;
    background: var(--bg-tertiary, #e5e7eb);
    border-radius: 999px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: var(--warning-color, #f59e0b);
    transition: width 0.3s ease;
}

/* ============================================================================
   Tabs
   ========================================================================= */

.tabs {
    display: flex;
    flex-direction: column;
}

.tabs-header {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-button:hover:not(.tab-disabled) {
    color: var(--primary-color, #2563eb);
}

.tab-active {
    color: var(--primary-color, #2563eb);
    border-bottom-color: var(--primary-color, #2563eb);
}

.tab-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary-color, #2563eb);
    color: white;
    border-radius: 999px;
}

.tabs-content {
    animation: fadeIn 0.3s ease-out;
}

.tab-panel {
    padding: 0;
}

/* Tabs variant: pills */
.tabs-pills .tabs-header {
    border-bottom: none;
    margin-bottom: 1rem;
}

.tabs-pills .tab-button {
    border-radius: var(--radius-md);
    border-bottom: none;
    margin-bottom: 0;
}

.tabs-pills .tab-active {
    background-color: var(--primary-color, #2563eb);
    color: white;
}

/* ============================================================================
   Accordion
   ========================================================================= */

.accordion {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    background: var(--bg-primary);
    border: none;
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: background-color 0.2s;
    text-align: left;
}

.accordion-header:hover {
    background-color: var(--bg-secondary);
}

.accordion-item-open .accordion-header {
    background-color: var(--bg-secondary);
}

.accordion-title {
    flex: 1;
}

.accordion-toggle {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-secondary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content-open {
    max-height: 2000px;
}

.accordion-body {
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
}

/* ============================================================================
   Pagination
   ========================================================================= */

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.pagination-info {
    font-size: 0.875rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-button {
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0.375rem 0.625rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-button:hover:not(:disabled) {
    background: var(--bg-secondary);
    border-color: var(--primary-color, #2563eb);
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-active {
    background: var(--primary-color, #2563eb);
    color: white;
    border-color: var(--primary-color, #2563eb);
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: var(--text-secondary);
}

.page-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================================
   Animations
   ========================================================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ============================================================================
   Responsive
   ========================================================================= */

@media (max-width: 768px) {
    .modal-dialog {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .toast-container {
        left: 0;
        right: 0;
        max-width: 100%;
    }

    .tabs-header {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination {
        justify-content: center;
    }
}

/* ============================================================================
   Image Gallery
   ========================================================================= */

.image-gallery {
    width: 100%;
}

.gallery-main {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    margin-bottom: 1rem;
}

.gallery-main-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: contain;
}

.gallery-main-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 1rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-main:hover .gallery-main-overlay {
    opacity: 1;
}

.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.gallery-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-thumbnail:hover {
    border-color: var(--primary-color, #2563eb);
    transform: scale(1.05);
}

.gallery-thumbnail-active {
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-placeholder {
    width: 100%;
    height: 400px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-placeholder-content {
    text-align: center;
    color: var(--text-secondary);
    font-size: 3rem;
}

.gallery-placeholder-content p {
    font-size: 1rem;
    margin-top: 1rem;
}

/* Gallery Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.gallery-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 90vh;
    display: block;
}

.gallery-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 2.5rem;
    line-height: 1;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.gallery-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.gallery-modal-prev,
.gallery-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 3rem;
    line-height: 1;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.gallery-modal-prev {
    left: 2rem;
}

.gallery-modal-next {
    right: 2rem;
}

.gallery-modal-prev:hover,
.gallery-modal-next:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.gallery-modal-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .gallery-modal-prev {
        left: 0.5rem;
        width: 3rem;
        height: 3rem;
        font-size: 2rem;
    }

    .gallery-modal-next {
        right: 0.5rem;
        width: 3rem;
        height: 3rem;
        font-size: 2rem;
    }
}

/* ============================================================================
   Enrollment Wizard
   ========================================================================= */

.enrollment-wizard {
    padding: 2rem 0;
}

.enrollment-progress {
    position: relative;
    padding: 2rem 0;
}

.enrollment-progress .d-flex {
    position: relative;
    z-index: 1;
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.progress-step-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.progress-step.active .progress-step-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.progress-step.completed .progress-step-icon {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.progress-step-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    transition: color 0.3s ease;
}

.progress-step.active .progress-step-title {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-step.completed .progress-step-title {
    color: var(--success-color);
}

.progress-step-line {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
    transition: background 0.3s ease;
}

.progress-step.completed .progress-step-line {
    background: var(--success-color);
}

.step-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    min-height: 400px;
}

.step-content h2 {
    color: var(--text-primary);
}

.step-content .card.cursor-pointer:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    transition: all 0.2s ease;
}

.step-content .card.border-primary {
    border-width: 2px;
}

/* Radio labels for enrollment */
.radio-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.radio-label:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.radio-label input[type="radio"] {
    margin-right: 0.5rem;
}

.radio-label input[type="radio"]:checked + span,
.radio-label:has(input[type="radio"]:checked) {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Responsive enrollment wizard */
@media (max-width: 768px) {
    .enrollment-progress .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .progress-step {
        flex-direction: row;
        align-items: center;
        width: 100%;
        margin-bottom: 1rem;
    }

    .progress-step-icon {
        margin-bottom: 0;
        margin-right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    .progress-step-title {
        text-align: left;
        flex: 1;
    }

    .progress-step-line {
        display: none;
    }

    .step-content {
        padding: 1rem;
    }
}

/* ============================================================================
   Bottom Action Bar — fixed, thumb-reachable, icon-only quick actions.
   Mounted globally by js/components/action-bar.js. Sits below the mobile nav
   drawer / modals / toasts (z 940–2000) but above page content.
   ============================================================================ */
.action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 800;
    display: flex;
    align-items: stretch;
    height: 56px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--color-bg-primary);
    border-top: 1px solid var(--color-border-primary);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
}

.action-bar-btn {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.action-bar-btn:hover { color: var(--color-text-primary); }
.action-bar-btn.active { color: var(--color-primary); }

.action-bar-icon { display: inline-flex; }
.action-bar-btn svg { width: 24px; height: 24px; display: block; }

/* Centre CTA (Add) raised into a filled primary circle. */
.action-bar-btn-center .action-bar-icon {
    width: 52px;
    height: 52px;
    margin-top: -18px;                 /* lift above the bar */
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border: 3px solid var(--color-bg-primary);
    box-shadow: var(--shadow-md);
    transition: background 0.15s ease;
}
.action-bar-btn-center:hover .action-bar-icon { background: var(--color-primary-hover); }
.action-bar-btn-center svg { width: 26px; height: 26px; }

/* Keep page content (and the footer) clear of the fixed bar. */
body.has-action-bar { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }

/* Wide desktop: the top navbar already exposes every destination, so the
   thumb bar is mobile-only. Hide it (and drop the body padding) above the
   same 1024px breakpoint the nav uses to collapse its drawer. */
@media (min-width: 1025px) {
    .action-bar { display: none; }
    body.has-action-bar { padding-bottom: 0; }
}
