/* Main CSS file for Find Debt Page application */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    flex: 1;
    background-color: white;
    width: 100%;
}

/* Progress Header */
.progress-header {
    background-color: #4a4a4a;
    padding: 0;
    height: 4px;
}

.progress-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: white;
    border-bottom: 1px solid #e9ecef;
}

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

.step-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: bold;
}

.step-circle.completed {
    background-color: #28a745;
    color: white;
}

.step-circle.active {
    background-color: #007bff;
    color: white;
}

.step-circle.inactive {
    background-color: #d6d8db;
    color: #6c757d;
}

.step-label {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
}

.step-label.completed {
    color: #28a745;
    font-weight: 600;
}

.step-label.active {
    color: #007bff;
    font-weight: 600;
}

/* Content Styles */
.content {
    padding: 40px;
}

.main-heading {
    font-size: 32px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 24px;
    text-align: center;
}

.subtitle {
    font-size: 18px;
    color: #5a6c7d;
    margin-bottom: 40px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background-color: #f8f9fa;
}

.form-input:focus {
    outline: none;
    border-color: #007bff;
    background-color: white;
}

.form-input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 50px;
}

.form-select:focus {
    outline: none;
    border-color: #007bff;
    background-color: white;
}

.help-text {
    font-size: 14px;
    color: #6c757d;
    margin-top: 8px;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
    margin-top: 8px;
    font-size: 14px;
    display: none;
}

/* Button Styles */
.button-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.btn {
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    position: relative;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #e9ecef;
    color: #6c757d;
}

.btn-secondary:hover {
    background-color: #d6d8db;
    transform: translateY(-1px);
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Spinner */
.spinner {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn.loading .spinner {
    display: inline-block;
}

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

/* Contact Search */
.contact-search-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    border-left: 4px solid #007bff;
}

.search-results {
    margin-top: 20px;
}

.contact-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.1);
}

.contact-card.selected {
    border-color: #28a745;
    background-color: #f8fff9;
}

.contact-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.contact-details {
    color: #6c757d;
    font-size: 14px;
}

.contact-details div {
    margin-bottom: 4px;
}

/* Info Boxes */
.info-box {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
    margin: 32px 0;
    font-size: 16px;
}

.info-box.success {
    background-color: #e8f5e8;
    color: #155724;
    border-left-color: #28a745;
}

.info-box.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.info-box.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

/* Social Proof Styles */
.social-proof {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 30px 40px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 30px;
}

.proof-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.proof-logo {
    height: 40px;
    width: auto;
}

.proof-text {
    text-align: left;
}

.proof-rating {
    font-weight: bold;
    font-size: 16px;
    color: white;
}

.proof-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

/* Footer Styles */
.footer-container {
    background-color: #2c3e50;
    color: white;
    margin-top: auto;
}

.faq-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
}

.faq-heading {
    font-size: 28px;
    font-weight: 600;
    color: white;
    text-align: center;
    margin-bottom: 30px;
}

.faq-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-question.active {
    background: rgba(255, 255, 255, 0.1);
    color: #3b82f6;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: transparent;
}

.faq-answer.active {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 24px 24px 24px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.accordion-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
    fill: currentColor;
}

.faq-question.active .accordion-icon {
    transform: rotate(180deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .progress-nav {
        padding: 15px 12px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .progress-nav::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .progress-step {
        min-width: 80px;
        flex-shrink: 0;
        gap: 6px;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-bottom: 8px;
        flex-shrink: 0;
    }

    .step-label {
        font-size: 11px;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.3;
    }

    .content {
        padding: 20px;
    }

    .main-heading {
        font-size: 24px;
    }

    .subtitle {
        font-size: 16px;
    }

    .contact-search-section {
        padding: 20px;
    }

    .social-proof {
        gap: 20px;
        padding: 20px;
    }

    .proof-item {
        flex-direction: column;
        text-align: center;
        padding: 12px;
        gap: 8px;
    }

    .proof-text {
        text-align: center;
    }

    .button-group {
        flex-direction: column;
        align-items: center;
    }

    .faq-section {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .progress-nav {
        padding: 10px 0px;
    }

    .progress-step {
        min-width: 45px;
        gap: 5px;
    }

    .step-circle {
        width: 30px;
        height: 30px;
        font-size: 13px;
        margin-bottom: 6px;
        flex-shrink: 0;
    }

    .step-label {
        font-size: 10px;
        max-width: 70px;
        line-height: 1.3;
    }
}

/* Page-specific styles that can be extended */
.page-eligibility .container {
    max-width: 800px;
}

.page-debts .container,
.page-budget .container {
    max-width: 900px;
}

.page-program .container {
    max-width: 1200px;
}

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(2px);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-text {
    color: #007bff;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    min-height: 24px;
    transition: opacity 0.3s ease;
}

/* Contact display improvements */
.contact-detail-row {
    margin-bottom: 8px;
    word-wrap: break-word;
}

.contact-detail-row:last-child {
    margin-bottom: 0;
}