@import url('steps/phase-1-step-1-name.css');
@import url('steps/phase-1-step-2-birthdate.css');
@import url('steps/phase-1-step-3-gender.css');
@import url('steps/phase-1-step-4-breed.css');
@import url('steps/phase-2-step-5-weight.css');
@import url('steps/phase-2-step-6-body.css');
@import url('steps/phase-2-step-7-activity.css');
@import url('steps/phase-3-step-8-health.css');
@import url('steps/phase-3-step-9-allergies.css');
@import url('steps/photo-modal.css');
@import url('steps/submission-animation.css');

:root {
    /* Colors */
    --rc-primary: #f99e22;
    --rc-primary-dark: #ff8c00;
    --rc-text: #512035;
    --rc-text-light: #5b5f73;
    --rc-text-muted: #6c757d;
    --rc-border: #e5e7eb;
    --rc-border-warm: #f1e9e0;
    --rc-bg-selected: #fff8f0;
    --rc-bg-selected-gradient: linear-gradient(180deg, #fffdfa 0%, #fff6e8 100%);
    --rc-error: #dc3545;

    /* Shadows */
    --rc-shadow-card: 0 15px 28px rgba(81, 32, 53, 0.08);
    --rc-shadow-card-hover: 0 24px 44px rgba(81, 32, 53, 0.15);
    --rc-shadow-selected: 0 4px 20px rgba(249, 158, 34, 0.2);
    --rc-shadow-focus: 0 0 0 4px rgba(249, 158, 34, 0.2);
    --rc-shadow-hover-light: 0 4px 15px rgba(249, 158, 34, 0.15);
    --rc-shadow-btn-hover: 0 2px 8px rgba(249, 158, 34, 0.2);

    /* Transitions */
    --rc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --rc-transition-fast: all 0.25s ease;

    /* Typography */
    --rc-font: "Proxima Nova", "Proxima Soft", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Radius */
    --rc-radius-card: 16px;
    --rc-radius-btn: 40px;
}

#rawbark-comparator {
    /* min-height: 100vh; */
    padding: 3rem 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: var(--rc-font) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.comparator-wrapper {
    background: #ffffff !important;
    border-radius: 24px !important;
    box-shadow: 0 12px 36px rgba(18, 0, 34, 0.08) !important;
    border: none !important;
    position: relative !important;
    max-width: 810px !important;
    width: 81vw !important;
    margin: 0 auto !important;
    padding: 3.6rem 4.5rem !important;
    min-height: 500px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.progress-container {
    margin-bottom: 2.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.progress {
    height: 5px;
    border-radius: 12px;
    background-color: #f1f2f6;
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 280px;
}

.progress-bar {
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: linear-gradient(90deg, var(--rc-primary) 0%, var(--rc-primary-dark) 100%);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(249, 158, 34, 0.25);
}

.step-indicator {
    margin-bottom: 0;
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.step-text {
    font-weight: 500;
    color: #9ca3af;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
}

.form-control:focus {
    border-color: #8B4513;
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.step-title {
    color: var(--rc-text) !important;
    font-weight: 700 !important;
    font-size: 1.6rem !important;
    line-height: 1.25 !important;
    margin-bottom: 1.25rem !important;
    letter-spacing: -0.1px !important;
    font-family: var(--rc-font) !important;
    text-rendering: optimizeLegibility !important;
    max-width: 100% !important;
    font-synthesis: none;
    white-space: nowrap !important;
    text-align: center;
}

.step-content {
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.phase-content {
    display: flex;
    flex-direction: column;
}

.phase-content .step-content {
    min-height: auto;
    display: block;
    margin-bottom: 2.5rem;
}

.phase-content .step-content:last-of-type {
    margin-bottom: 0;
}

.phase-navigation {
    margin-top: 2rem;
}

#phase-nav-2 .btn-rawbark-primary,
#phase-nav-2 .btn-rawbark-secondary {
    padding: 0.5rem 1.25rem !important;
    font-size: 0.85rem !important;
}

/* Info toggle for step descriptions */
.step-info-btn {
    display: inline-flex;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--rc-border);
    color: var(--rc-text-muted);
    font-weight: 700;
    font-size: 0.65rem;
    background-color: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--rc-transition-fast);
    padding: 0;
    line-height: 1;
    font-style: italic;
    font-family: Georgia, serif;
    vertical-align: middle;
    margin-left: 0.25rem;
    position: relative;
    top: -1px;
}

.step-info-btn:hover {
    border-color: var(--rc-primary);
    color: var(--rc-primary);
    background-color: #fff7ec;
}

.step-info-btn[aria-expanded="true"] {
    border-color: var(--rc-primary);
    color: var(--rc-primary);
    background-color: #fff7ec;
}

.step-info-text {
    margin-top: 0.75rem !important;
}

.custom-breed-display.is-default-breed {
    border-style: dashed !important;
}

.navigation-buttons {
    margin: 0 !important;
    margin-top: auto !important;
    padding-top: 1.5rem;
    border-top: none;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1.25rem !important;
    flex-wrap: wrap !important;
}

.btn-rawbark-primary {
    background: #ffffff !important;
    border: 2px solid #f99e22 !important;
    color: #512035 !important;
    font-weight: 800 !important;
    padding: 0.65rem 1.75rem !important;
    transition: var(--rc-transition) !important;
    border-radius: 40px !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.5px !important;
    text-transform: none !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
}

.btn-rawbark-primary:hover {
    transform: translateY(-1px) !important;
    background: #f99e22 !important;
    border-color: #f99e22 !important;
    color: #ffffff !important;
    box-shadow: var(--rc-shadow-btn-hover) !important;
}

.btn-rawbark-primary:active {
    transform: translateY(0) !important;
    background: rgba(249, 158, 34, 0.2) !important;
}

.btn-rawbark-primary:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    background: #ffffff !important;
    color: #a0a0a0 !important;
    border-color: #d0d0d0 !important;
}

.btn-rawbark-secondary {
    color: #512035 !important;
    border: 2px solid #f99e22 !important;
    background-color: #ffffff !important;
    border-radius: 40px !important;
    font-weight: 800 !important;
    padding: 0.65rem 1.75rem !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.3px !important;
    transition: var(--rc-transition) !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
}

.btn-rawbark-secondary:hover:not(:disabled) {
    background-color: #f99e22 !important;
    border-color: #f99e22 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--rc-shadow-btn-hover) !important;
}

.btn-rawbark-secondary:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    background-color: #ffffff !important;
    color: #a0a0a0 !important;
    border-color: #d0d0d0 !important;
}

.btn-rawbark-primary:focus-visible,
.btn-rawbark-secondary:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(249, 158, 34, 0.25) !important;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
}

.btn-label {
    display: inline-block;
}

.invalid-feedback {
    display: none;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #dc3545;
    animation: shake 0.5s;
}

.invalid-feedback.show {
    display: block !important;
}

.error-icon {
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 1.1rem;
    vertical-align: middle;
}

.error-text {
    vertical-align: middle;
}

.name-input.is-invalid {
    border-color: #dc3545 !important;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@media (max-width: 575px) {
    .step-title {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
        text-align: left;
    }

    .progress-container {
        margin-bottom: 0.75rem;
        gap: 0.2rem;
    }

    .phase-content .step-content {
        margin-bottom: 1.25rem;
    }

    .phase-navigation {
        margin-top: 1rem;
    }

    .navigation-buttons {
        flex-wrap: nowrap !important;
        gap: 0.75rem !important;
        padding-top: 1rem;
    }

    .navigation-buttons .mr-3 {
        margin-right: 0 !important;
    }

    .navigation-buttons .btn {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center !important;
        white-space: nowrap;
    }

    .navigation-buttons .btn-rawbark-primary,
    .navigation-buttons .btn-rawbark-secondary {
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
    }

    #step-photo .navigation-buttons .btn-rawbark-secondary {
        flex: 0 0 40%;
        font-size: 0.9rem !important;
        padding: 0.75rem 0.75rem !important;
    }

    #step-photo .navigation-buttons .btn-rawbark-primary {
        flex: 1 1 60%;
        font-size: 0.95rem !important;
        padding: 0.75rem 0.9rem !important;
        white-space: normal;
        line-height: 1.1;
    }
}
