/* --- Configurator Specific Styles --- */

:root {
    --primary: #00C2B8;
    --primary-light: #00D1C7;
    --primary-dark: #00A39B;
    --secondary: #1e293b;
    --accent: #f59e0b;
    --background: #f8fafc;
    --glass: rgba(255, 255, 255, 0.9);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-radius: 16px;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.config-container {
    max-width: 850px;
    margin: 40px auto;
    padding: 40px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

/* Background gradient accent */
.config-container::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 194, 184, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.progress-container {
    margin-bottom: 40px;
}

.progress-bar {
    height: 10px;
    background: #eef2f6;
    border-radius: 20px;
    margin: 25px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    width: 25%;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 15px rgba(0, 194, 184, 0.3);
}

#step-indicator {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#step-title {
    margin-top: 8px;
    font-size: 1.8rem;
    color: var(--secondary);
    font-weight: 800;
}

.step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step.active {
    display: block;
}

.form-section-title {
    margin: 30px 0 20px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #eef2f6 0%, transparent 100%);
}

.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    gap: 20px;
}

.btn-prev {
    background: #ffffff;
    color: #475569;
    padding: 14px 28px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-prev:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateX(-4px);
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 14px 40px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(0, 194, 184, 0.39);
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 194, 184, 0.23);
    opacity: 1;
}

.btn-next:active,
.btn-submit:active {
    transform: translateY(0);
}

.btn-next:disabled,
.btn-submit:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 650px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .config-container {
        padding: 25px;
        margin: 15px;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #475569;
    font-size: 0.95rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-input,
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    font-size: 1rem;
    color: #1e293b;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.form-input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 194, 184, 0.1);
    background: #fff;
}

.file-upload-area {
    border: 2px dashed #cbd5e1;
    padding: 40px;
    text-align: center;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(0, 194, 184, 0.02);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.checkbox-label:hover {
    background: rgba(0, 194, 184, 0.05);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.referral-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.8) 0%, #ffffff 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.referral-disclaimer {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 15px;
    line-height: 1.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal.show {
    animation: modalBgFadeIn 0.3s ease-out;
}

@keyframes modalBgFadeIn {
    from {
        background: rgba(15, 23, 42, 0);
        backdrop-filter: blur(0);
    }

    to {
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(8px);
    }
}

.modal-content {
    background: #fff;
    padding: 35px 32px;
    border-radius: 20px;
    max-width: 480px;
    width: 90%;
    position: relative;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 194, 184, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.modal-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 8px;
}

.modal-message {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 20px;
    line-height: 1.5;
}

.referral-success-box {
    background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%);
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 194, 184, 0.2);
    text-align: left;
}

.referral-success-box p {
    margin-bottom: 8px;
    color: #334155;
}

#referral-success-link {
    display: block;
    word-break: break-all;
    font-weight: 700;
    color: var(--primary);
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed var(--primary);
    margin: 10px 0;
    text-decoration: none;
    font-size: 0.9rem;
}

#referral-success-link {
    display: block;
    word-break: break-all;
    font-weight: 700;
    color: var(--primary);
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed var(--primary);
    margin: 10px 0;
    text-decoration: none;
    font-size: 0.9rem;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: #94a3b8;
    text-decoration: none;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--secondary);
}

.flex {
    display: flex;
}

.justify-center {
    justify-content: center;
}

.gap-3 {
    gap: 0.75rem;
}

.hidden {
    display: none !important;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

/* Responsiveness */
@media (max-height: 750px) {
    .modal-content {
        padding: 20px 24px;
    }

    .modal-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: 12px;
    }

    .modal-title {
        font-size: 1.4rem;
    }

    .modal-message {
        margin-bottom: 15px;
    }

    .referral-success-box {
        padding: 12px;
        margin-bottom: 15px;
    }
}

@media (max-width: 640px) {
    .modal-content {
        padding: 20px 15px;
        width: 95%;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }

    .referral-success-box {
        padding: 10px;
    }
}