/* Poppins Font */
@font-face {
    font-family: 'Poppins';
    src: url('../font/poppins.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f5f5f5;
}

/* Desktop phone frame (only for desktop > 1024px) */
@media (min-width: 1025px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        background: #e0e0e0;
    }

    .phone-frame {
        width: 100%;
        max-width: 430px;
        background: #fff;
        border-radius: 40px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        overflow: hidden;
        position: relative;
    }

    .phone-content {
        width: 100%;
        height: 100%;
        overflow-y: auto;
    }
}

/* Mobile and Tablet - Full width */
@media (max-width: 1024px) {
    .phone-frame {
        width: 100%;
        min-height: 100vh;
    }

    .phone-content {
        width: 100%;
        min-height: 100vh;
    }
}

/* Common page styles */
.page {
    background: #F2F2F7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: #3d3fb5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #3d3fb5;
}

.logo-sub {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: #ebebeb;
}

.menu-btn {
    background: #3d3fb5;
    color: #fff;
}

.content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
}

.content form {
    padding: 0 20px 20px 20px;
}

.content form .question-card {
    margin: 20px 0;
}

/* Login page */
.login-page {
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.3rem;
}

.login-illustration {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-illustration img {
    max-width: 280px;
    width: 100%;
    height: auto;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: #7a7a7a;
    text-align: center;
    margin-bottom: 32px;
}

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

.form-label {
    display: block;
    font-size: 13px;
    color: #4a4a4a;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9a9a9a;
    font-size: 18px;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    background: #fff;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #3d3fb5;
    box-shadow: 0 0 0 3px rgba(61, 63, 181, 0.1);
}

.form-input::placeholder {
    color: #b0b0b0;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 16px;
    border: 1px solid #fcc;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4a4dc7 0%, #3d3fb5 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 40px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(61, 63, 181, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-btn{
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3d3fb5 54%, #5b5dcf 79%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 3rem 0;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(61, 63, 181, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Tablet - Full width */
@media (max-width: 1024px) {

    .login-page {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        width: 85%;
        margin: auto;
        padding: 4rem 1.3rem;
    }
}
/* mobile */
@media (max-width: 500px) {

    .login-page {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 85%;
        margin: auto;
        padding: 0;
    }
}
@media (max-width: 400px) {
    .login-illustration{
        margin-bottom: 0.5rem;
    }
    .submit-btn{
        margin: 1.5rem 0;
    }
}

/* Info/Content page */
.info-section {
    margin-bottom: 24px;
}

.info-hero {
    text-align: center;
    margin-bottom: 32px;
}

.info-hero-title {
    font-size: 32px;
    font-weight: 800;
    color: #3d3fb5;
    line-height: 1.2;
    margin-bottom: 4px;
}

.info-hero-subtitle {
    font-size: 24px;
    font-weight: 700;
    color: #ff6b35;
    text-transform: uppercase;
}

.info-hero-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #3d3fb5, transparent);
    margin: 16px auto;
}

.info-heading {
    font-size: 22px;
    font-weight: 700;
    color: #3d3fb5;
    margin-bottom: 12px;
    line-height: 1.3;
}

.info-heading.accent {
    background: linear-gradient(135deg, #ff6b35, #ff8c5f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-text {
    font-size: 15px;
    color: #4a4a4a;
    line-height: 1.6;
    margin-bottom: 12px;
}

.info-text strong {
    color: #ff6b35;
    font-weight: 700;
}

.info-list {
    list-style: none;
    margin: 16px 0;
}

.info-list li {
    padding: 12px 0;
    border-bottom: 1px dashed #e5e5e5;
    font-size: 15px;
    color: #4a4a4a;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li strong {
    color: #3d3fb5;
    font-weight: 700;
}

.info-card {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.footer-branding {
    text-align: center;
    margin: 24px 0;
    background-color: white;
}

.footer-logo {
    font-size: 28px;
    font-weight: 700;
    padding: 1rem;
}

.footer-logo .cospiaq {
    background: linear-gradient(135deg, #6b4dc7, #9b4dc7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo .sm {
    color: #ff6b35;
}

.footer-tagline {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* Survey page */
.survey-section {
    margin-bottom: 32px;
}

/* Add Doctor Card with Gradient */
.add-doctor-card {
    background: linear-gradient(135deg, #2E3192 0%, #6468E8 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-doctor-content {
    flex: 1;
}

.add-doctor-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.add-doctor-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-bottom: 16px;
}

.btn-add-doctor {
    background: #FF6B35;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins';
}

.btn-add-doctor:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

.add-doctor-image {
    flex-shrink: 0;
    margin-left: 16px;
}

.add-doctor-image img {
    width: 100px;
    height: auto;
}

/* Checkbox Grid for Question 10 */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

/* Question Wrapper - for questions inside section cards */
.question-wrapper {
    margin-top: 24px;
}

.question-wrapper:first-of-type {
    margin-top: 0;
}

/* Image Cards for Q10 and Q11 (image-based questions) */
.checkbox-image-card {
    /* border: 2px solid #e5e5e5; */
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
    text-align: center;
}

.checkbox-image-card input[type="checkbox"] {
    display: none; /* Hide checkbox for image-based questions */
}

.checkbox-image-card:has(input:checked) {
    border-color: #3d3fb5;
    background: rgba(61, 63, 181, 0.05);
    border: 1px solid;
}

.other-input-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    min-height: 120px;
}

.other-text-input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 14px;
    color: #333;
    outline: none;
    font-weight: 500;
    padding: 8px;
}

.other-text-input::placeholder {
    color: #999;
    font-size: 13px;
}

.other-text-input:focus {
    color: #3d3fb5;
}

.checkbox-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.checkbox-card-image {
    /* width: 48px;
    height: 48px; */
    object-fit: contain;
}

.checkbox-card-label {
    font-size: 12px;
    font-weight: 500;
    color: #4a4a4a;
    text-align: center;
}

.checkbox-image-card:has(input:disabled),
.checkbox-button:has(input:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .add-doctor-image img {
        width: 80px;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.btn-add {
    padding: 8px 16px;
    background: #3d3fb5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-add:hover {
    background: #3537a0;
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    background: #fff;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #3d3fb5;
    box-shadow: 0 0 0 3px rgba(61, 63, 181, 0.1);
}

.question-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.question-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.5;
}

.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: #3d3fb5;
    box-shadow: 0 0 0 3px rgba(61, 63, 181, 0.1);
}

/* Section Headers - Inline text inside question cards */
.section-header-text {
    color: #3d3fb5;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Radio Buttons - Button Style */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-button {
    display: block;
    cursor: pointer;
    position: relative;
}

.radio-button input[type="radio"] {
    display: none;
}

.radio-button span {
    display: block;
    padding: 14px 16px;
    background: rgba(61, 63, 181, 0.05);
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    transition: all 0.3s;
}

.radio-button input[type="radio"]:checked + span {
    background: #3d3fb5;
    color: #fff;
    font-weight: 600;
}

/* Horizontal Radio Buttons (Yes/No/Sometimes) */
.radio-group-horizontal {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.radio-button-horizontal {
    flex: 1;
    cursor: pointer;
}

.radio-button-horizontal input[type="radio"] {
    display: none;
}

.radio-button-horizontal span {
    display: block;
    padding: 12px;
    background: rgba(61, 63, 181, 0.05);
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
    transition: all 0.3s;
}

.radio-button-horizontal input[type="radio"]:checked + span {
    background: #3d3fb5;
    color: #fff;
}

/* Checkbox Buttons (for Q7 occupations) */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-button {
    display: block;
    cursor: pointer;
}

.checkbox-button input[type="checkbox"] {
    display: none;
}

.checkbox-button span {
    display: block;
    padding: 14px 16px;
    background: rgba(61, 63, 181, 0.05);
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    transition: all 0.3s;
}

.checkbox-button input[type="checkbox"]:checked + span {
    background: #3d3fb5;
    color: #fff;
    font-weight: 600;
}

/* Range Slider */
.range-slider-wrapper {
    padding: 16px 0;
}

.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #e5e5e5 0%, #3d3fb5 0%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3d3fb5;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(61, 63, 181, 0.3);
    transition: all 0.2s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(61, 63, 181, 0.5);
}

.range-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3d3fb5;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(61, 63, 181, 0.3);
    transition: all 0.2s;
}

.range-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(61, 63, 181, 0.5);
}

.range-value-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #7a7a7a;
    margin-top: 8px;
}

.range-current-value {
    font-size: 18px;
    font-weight: 700;
    color: #3d3fb5;
    padding: 8px 16px;
    background: rgba(61, 63, 181, 0.1);
    border-radius: 8px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    color: #333;
}

.modal-body {
    margin-bottom: 20px;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
}

.btn-secondary:hover {
    background: #ebebeb;
}

/* Menu Modal */
.menu-modal {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    max-width: 360px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.menu-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.menu-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-item {
    display: block;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
}

.menu-item:hover {
    background: #f9f9fb;
    border-color: #3d3fb5;
}

.menu-image {
    margin-top: 24px;
    text-align: center;
}

.menu-image img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

/* Thank you page */
.thankyou-page {
    text-align: center;
    padding: 40px 20px;
}

.thankyou-title {
    font-size: 48px;
    font-weight: 800;
    color: #3d3fb5;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.thankyou-content {
    max-width: 600px;
    margin: 0 auto;
}

.thankyou-section {
    margin-bottom: 32px;
    text-align: left;
}

.thankyou-heading {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.thankyou-text {
    font-size: 15px;
    color: #4a4a4a;
    line-height: 1.6;
    margin-bottom: 12px;
}

.thankyou-highlight {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    border: 2px solid #3d3fb5;
    margin: 24px 0;
}

.thankyou-highlight strong {
    color: #3d3fb5;
    font-size: 18px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.mt-24 {
    margin-top: 24px;
}

.mb-24 {
    margin-bottom: 24px;
}

/* Home indicator for iOS-like appearance (desktop only) */
@media (min-width: 1025px) {
    .phone-frame::after {
        content: '';
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 134px;
        height: 5px;
        background: #1a1a1a;
        border-radius: 100px;
    }
}
