/* Quiz Specific Styles - Credit Resolve Debt Qualification Quiz */

/* Quiz Container */
.quiz-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #F9FAFB 0%, #E5E7EB 100%);
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.quiz-container::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 163, 163, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.quiz-container::after {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

/* Quiz Card */
.quiz-card {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 50px;
    padding-bottom: 120px;
    position: relative;
    z-index: 1;
}

/* Quiz Header */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.quiz-back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #0891B2;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.quiz-back-link:hover {
    background: rgba(8, 145, 178, 0.1);
}

.quiz-progress-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quiz-step-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 70px;
}

.progress-bar-bg {
    flex: 1;
    height: 8px;
    background: #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-teal) 0%, var(--primary-teal-light) 100%);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-percentage {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 700;
    min-width: 45px;
    text-align: right;
}

/* Quiz Step */
.quiz-step {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

.quiz-step.active {
    display: block;
}

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

/* Quiz Icon */
.quiz-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.quiz-icon-circle {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #B8E5E5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-icon-circle.teal {
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-teal-light) 100%);
}

.quiz-icon-circle.purple {
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-teal-light) 100%);
}

.quiz-icon-circle.green {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

/* Question Styling */
.quiz-question {
    font-size: 32px;
    color: var(--navy-dark);
    font-weight: 800;
    margin-bottom: 16px;
    text-align: center;
    line-height: 1.3;
}

.quiz-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Debt Types Grid */
.debt-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

/* Debt Card */
.debt-card {
    position: relative;
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.debt-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.debt-card-content {
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.debt-card:hover .debt-card-content {
    border-color: #B8E5E5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 163, 163, 0.1);
}

.debt-card input[type="checkbox"]:checked ~ .debt-card-content {
    background: linear-gradient(135deg, rgba(0, 163, 163, 0.1) 0%, rgba(8, 145, 178, 0.15) 100%);
    border-color: var(--primary-teal);
    border-width: 3px;
    box-shadow: 0 4px 16px rgba(0, 163, 163, 0.2);
}

.debt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.debt-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.debt-card-check {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.debt-card input[type="checkbox"]:checked ~ .debt-card-content .debt-card-check {
    opacity: 1;
}

.debt-card input[type="checkbox"]:checked ~ .debt-card-content .checkmark {
    opacity: 1;
}

.checkmark {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.debt-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--navy-dark);
    margin-bottom: 6px;
}

.debt-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Info Box */
.quiz-info-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.quiz-info-box.warning {
    background: #FEF3C7;
    border: 2px solid #F59E0B;
}

.info-box-icon {
    flex-shrink: 0;
}

.info-box-content {
    flex: 1;
}

.info-box-title {
    font-size: 16px;
    font-weight: 700;
    color: #92400E;
    margin-bottom: 8px;
}

.info-box-text {
    font-size: 14px;
    color: #78350F;
    line-height: 1.6;
    margin: 0;
}

/* Trust Badges */
.quiz-trust-badges {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.quiz-trust-badges.centered {
    margin-top: 30px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Currency Input */
.currency-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
    gap: 8px;
}

.currency-symbol {
    font-size: 48px;
    font-weight: 700;
    color: var(--navy-dark);
}

.currency-input {
    font-size: 48px;
    font-weight: 700;
    color: var(--navy-dark);
    border: none;
    border-bottom: 3px solid #E5E7EB;
    padding: 12px 20px;
    text-align: center;
    width: 280px;
    transition: all 0.3s ease;
    background: transparent;
}

.currency-input:focus {
    outline: none;
    border-bottom-color: var(--primary-teal);
}

.currency-input::placeholder {
    color: #D1D5DB;
}

.currency-suffix {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 600;
}

.quiz-help-text {
    text-align: center;
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Quick Select Buttons */
.quick-select-label {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.quick-select-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.quick-select-btn {
    padding: 14px 20px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-select-btn:hover {
    border-color: var(--primary-teal);
    background: rgba(0, 163, 163, 0.06);
}

.quick-select-btn.selected {
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-teal-light) 100%);
    border-color: var(--primary-teal);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 163, 163, 0.3);
}

.or-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: #E5E7EB;
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

.or-divider span {
    background: white;
    padding: 0 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Form Sections */
.form-section {
    margin-bottom: 40px;
}

.form-section-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #F3F4F6;
}

.form-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy-dark);
    margin-bottom: 4px;
}

.form-section-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.required {
    color: #DC2626;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(0, 163, 163, 0.1);
}

.form-input.error {
    border-color: #DC2626;
}

.error-message {
    color: #DC2626;
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.error-message.visible {
    display: block;
}

/* Postcode Input */
.postcode-input-wrapper {
    position: relative;
}

.postcode-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.form-input.with-icon {
    padding-left: 42px;
}

/* Address Box */
.address-box {
    background: #ECFDF5;
    border: 2px solid #10B981;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}

.address-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.address-found-text {
    font-size: 16px;
    font-weight: 700;
    color: #065F46;
}

.address-details {
    margin-bottom: 16px;
}

.address-line {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
}

.address-label {
    font-weight: 600;
    color: #065F46;
    min-width: 80px;
}

#address-lines {
    color: #065F46;
    line-height: 1.6;
}

#address-area {
    color: #065F46;
}

.manual-address-btn {
    background: none;
    border: none;
    color: #0891B2;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.manual-address-btn:hover {
    color: #0E7490;
}

/* Privacy Notice */
.privacy-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    justify-content: center;
}

/* Privacy Notices Row */
.privacy-notices {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.privacy-notices .privacy-notice {
    margin-bottom: 0;
}

/* Navigation Buttons */
.quiz-navigation {
    display: flex;
    justify-content: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    border-top: 2px solid #F3F4F6;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    margin-top: 0;
}

.quiz-btn {
    padding: 16px 48px;
    border: none;
    border-radius: 30px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 840px;
}

.quiz-btn-primary,
.quiz-btn-submit {
    background: linear-gradient(135deg, var(--cta-amber) 0%, var(--cta-amber-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(var(--cta-amber-shadow), 0.35);
}

.quiz-btn-primary:hover:not(:disabled),
.quiz-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--cta-amber-shadow), 0.5);
}

.quiz-btn-primary:disabled,
.quiz-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.quiz-loading {
    display: none;
    text-align: center;
    padding: 40px 0;
}

.quiz-loading.visible {
    display: block;
}

.quiz-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #E5E7EB;
    border-top-color: var(--primary-teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

.quiz-loading-text {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Error Alert */
.quiz-error-alert {
    display: none;
    background: #FEE2E2;
    border: 2px solid #DC2626;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    color: #991B1B;
    font-size: 15px;
}

.quiz-error-alert.visible {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-card {
        padding: 30px 20px;
        padding-bottom: 100px;
        border-radius: 16px;
    }

    .quiz-question {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .quiz-subtitle {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .debt-types-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .currency-symbol {
        font-size: 36px;
    }

    .currency-input {
        font-size: 36px;
        width: 220px;
    }

    .quick-select-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .quiz-btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }
    
    .quiz-navigation {
        padding: 16px;
    }

    .quiz-trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .progress-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .quiz-container {
        padding: 20px 15px;
    }

    .quiz-card {
        padding: 25px 16px;
        padding-bottom: 90px;
    }

    .quiz-question {
        font-size: 20px;
    }

    .quiz-subtitle {
        font-size: 14px;
    }

    .currency-symbol {
        font-size: 28px;
    }

    .currency-input {
        font-size: 28px;
        width: 180px;
        padding: 8px 12px;
    }

    .quick-select-btn {
        padding: 12px 16px;
        font-size: 15px;
    }

    .quiz-btn {
        padding: 14px 36px;
        font-size: 16px;
        width: 100%;
        max-width: 100%;
    }
    
    .quiz-navigation {
        padding: 12px;
    }

    .debt-card-content {
        padding: 16px;
    }

    .debt-card-title {
        font-size: 15px;
    }

    .debt-card-desc {
        font-size: 13px;
    }
}
