/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Survey Module Styles */

/* Apply Poppins to all survey elements */
* {
    font-family: 'Poppins', sans-serif;
}

/* Survey body with blue background */
.survey-body {
    background: #2a5298;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
}

/* White Header Component */
.white-header {
    background: white;
    padding: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid #e0e0e0;
    position: relative;
}

.white-header-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 100px;
}

.header-left {
    position: absolute;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-btn {
    background: #3498db;
    border: none;
    color: white;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.back-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.logo-img-small {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f8f9fa;
    padding: 6px;
}

/* Center header content */
.header-center {
    text-align: center;
    color: #333;
    max-width: calc(100% - 320px);
}

.header-center h1 {
    font-size: 2.8rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
    letter-spacing: 2px;
}

.header-center p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin: 0;
    font-weight: normal;
}

/* Survey Start Page Styles */
.survey-start-container {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px 40px 0px;
    flex: 1;
    position: relative;
}

.survey-start-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.welcome-section {
    margin-top: 7rem;
}

.welcome-section h1 {
    font-size: 2.25rem;
    font-weight: bold;
    margin-bottom: 30px;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-text {
    font-size: 1.7rem;
    margin-bottom: 9rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.action-section {
    margin-bottom: 7rem;
}

.start-survey-button {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    text-decoration: none;
    padding: 25px 50px;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 50px;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.start-survey-button:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(243, 156, 18, 0.5);
}

.start-survey-button:active {
    transform: translateY(0);
}

.back-survey-button {
    background: linear-gradient(135deg, #f31212 0%, #e62222 100%);
    color: white;
    text-decoration: none;
    padding: 25px 50px;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 50px;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.back-survey-button:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(243, 18, 18, 0.5);
}

.back-survey-button:active {
    transform: translateY(0);
}

/* QR Code Section */
.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    flex: 1;
    justify-content: center;
}

.qr-code {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.qr-placeholder {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
    border-radius: 10px;
    color: #999;
    font-size: 3rem;
}

.qr-instructions {
    text-align: center;
    color: white;
    opacity: 0.9;
}

.qr-instructions p {
    font-size: 1.2rem;
    margin: 5px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Footer Info */
.footer-info {
    margin-top: auto;
    padding: 20px 15px;
    padding-bottom: 35px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
}

.footer-info p {
    font-size: 1.1rem;
    color: #1e3c72;
    margin: 0;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

/* Footer Image Container */
.survey-footer-image {
    position: relative;
    width: 100vw;
    height: 650px;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: auto;
    overflow: hidden;
    z-index: 0;
}

.survey-footer-image img {
    width: 100%;
    height: 650px;
    object-fit: cover;
    display: block;
}

/* Survey Form Styles */
.survey-form-container {
    min-height: calc(100vh - 120px);
    position: relative;
    overflow: hidden;
    padding: 20px 40px 0px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Background Image Container */
.survey-background-image {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 0;
    pointer-events: none;
    width: 100vw;
    height: 900px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.survey-background-image img {
    width: 100vw;
    height: 900px;
    object-fit: cover;
    display: block;
}

/* Survey Form Styles */
.survey-form-container {
    min-height: calc(100vh - 120px);
    position: relative;
    overflow: hidden;
    padding: 20px 40px 0px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.survey-form-content {
    max-width: 900px;
    margin: 0 auto;
    margin-top: 9rem;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.form-header {
    text-align: center;
    padding: 30px 40px 20px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 15px 15px 0 0;
}

.form-header h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.form-body {
    padding: 40px 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

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

.form-control {
    padding: 15px 18px;
    font-size: 1.1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 45px;
    appearance: none;
}

.radio-group {
    display: flex;
    gap: 30px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.radio-option:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #3498db;
    cursor: pointer;
}

.radio-option input[type="radio"]:checked+.radio-label {
    color: #3498db;
    font-weight: 600;
}

.radio-option:has(input[type="radio"]:checked) {
    background: #e3f2fd;
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.radio-label {
    font-size: 1.1rem;
    color: #495057;
    cursor: pointer;
    margin: 0;
    transition: all 0.3s ease;
}

.form-footer {
    padding: 25px 40px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

.form-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.back-button {
    background: white;
    color: #3498db;
    border: 2px solid #3498db;
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.2);
}

.back-button:hover {
    color: #3498db;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
    background: #f8f9fa;
}

.back-button:active {
    transform: translateY(0);
}

.submit-button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.3);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9 0%, #1f4e79 100%);
}

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

/* Large Radio Buttons for Survey Time */
.radio-group-large {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 20px;
}

.radio-option-large {
    position: relative;
    display: flex;
    align-items: center;
}

.radio-option-large input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-label-large {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 18px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.radio-label-large:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.2);
}

.radio-option-large input[type="radio"]:checked+.radio-label-large {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-color: #3498db;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

/* Form Footer Styling for Form Page */
.survey-form-container .footer-info {
    margin-top: 0;
    padding: 20px 0 35px 0;
    width: 100%;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    border-top: none;
}

.survey-form-container .footer-info p {
    font-size: 1.1rem;
    color: #1e3c72;
    margin: 0;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

/* Form validation styles */
.form-control.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.form-control.success {
    border-color: #27ae60;
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.1);
}

/* Direct Form Styles - No container */
.direct-survey-form {
    width: 100%;
}

.direct-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.direct-form-field {
    width: 100%;
}

.direct-input,
.direct-select {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    background: white;
    font-size: 1.1rem;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.direct-input:focus,
.direct-select:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    transform: translateY(-2px);
}

.direct-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 16 16'%3e%3cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

/* Radio buttons without background */
.direct-radio-simple {
    display: flex;
    align-items: center;
    color: white;
    padding: 15px 0;
}

.direct-radio-simple input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    cursor: pointer;
}

.direct-radio-simple input[type="radio"]:checked {
    border-color: white;
}

.direct-radio-simple input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.direct-radio-simple label {
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Success Modal Styles */
body.modal-open {
    overflow: hidden;
}

.success-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 1000 !important;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.success-modal:not([style*="display: none"]) {
    opacity: 1;
    visibility: visible;
}

.success-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.success-modal .modal-content {
    background: white !important;
    padding: 40px 50px !important;
    border-radius: 15px !important;
    text-align: center !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3) !important;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.success-modal .checkmark-container {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lottie-checkmark {
    width: 140px;
    height: 140px;
    margin: 0 auto;
}

@keyframes checkmarkPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-modal .success-message h3 {
    font-size: 1.4rem !important;
    color: #333 !important;
    margin: 10px 0 20px 0 !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

.success-modal .ok-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.3) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 140px;
}

.success-modal .ok-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4) !important;
}

.modal-button-container {
    margin-top: 20px;
}

/* Time Radio Container - Full Width */
.time-radio-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 10px;
}

.time-radio-container .direct-radio-simple {
    justify-content: flex-start;
}

/* Responsive adjustments for white header */
@media (max-width: 768px) {
    .white-header {
        padding: 15px 0;
    }

    .white-header-content {
        padding: 0 20px;
        min-height: 80px;
    }

    .header-left {
        left: 20px;
        gap: 15px;
    }

    .logo-img-small {
        width: 80px;
        height: 80px;
        padding: 4px;
    }

    .header-center {
        max-width: calc(100% - 240px);
    }

    .header-center h1 {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }

    .header-center p {
        font-size: 1rem;
    }

    /* Make direct form single column on tablets and smaller */
    .direct-form-fields {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 600px;
        padding: 15px 0;
    }

    .form-column {
        gap: 15px;
    }

    .direct-input,
    .direct-select {
        padding: 12px 18px;
        font-size: 1rem;
    }

    .direct-radio-simple {
        padding: 12px 0;
        justify-content: center;
    }

    .direct-radio-simple label {
        font-size: 1rem;
    }

    .time-radio-container {
        margin-top: 5px;
        gap: 2px;
    }

    .time-radio-container .direct-radio-simple {
        padding: 5px 0;
    }
}

/* Galaxy S8+ and similar narrow screens */
@media (max-width: 414px) {
    .white-header {
        padding: 12px 0;
    }

    .white-header-content {
        padding: 0 15px;
        min-height: 70px;
    }

    .header-left {
        left: 15px;
        gap: 10px;
    }

    .logo-img-small {
        width: 60px;
        height: 60px;
        padding: 3px;
    }

    .header-center {
        max-width: calc(100% - 180px);
    }

    .header-center h1 {
        font-size: 1.6rem;
        letter-spacing: 0.5px;
        margin-bottom: 3px;
    }

    .header-center p {
        font-size: 0.85rem;
    }

    /* Optimize form for smaller screens */
    .direct-form-fields {
        gap: 15px;
        max-width: 100%;
        padding: 10px 15px;
    }

    .form-column {
        gap: 12px;
    }

    .direct-input,
    .direct-select {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .direct-radio-simple {
        padding: 10px 0;
    }

    .time-radio-container {
        gap: 2px;
    }

    .time-radio-container .direct-radio-simple {
        padding: 4px 0;
    }
}

/* Extra narrow screens (iPhone SE, Galaxy S8, etc.) */
@media (max-width: 375px) {
    .white-header {
        padding: 10px 0;
    }

    .white-header-content {
        padding: 0 10px;
        min-height: 60px;
    }

    .header-left {
        left: 10px;
        gap: 8px;
    }

    .logo-img-small {
        width: 50px;
        height: 50px;
        padding: 2px;
    }

    .header-center {
        max-width: calc(100% - 140px);
    }

    .header-center h1 {
        font-size: 1.3rem;
        letter-spacing: 0;
        margin-bottom: 2px;
    }

    .header-center p {
        font-size: 0.75rem;
    }

    /* Further optimize for very small screens */
    .direct-form-fields {
        gap: 12px;
        padding: 10px 10px;
    }

    .form-column {
        gap: 10px;
    }

    .direct-input,
    .direct-select {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .direct-radio-simple {
        padding: 8px 0;
    }

    .time-radio-container {
        gap: 2px;
    }

    .time-radio-container .direct-radio-simple {
        padding: 5px 0;
    }
}

/* Very narrow screens */
@media (max-width: 320px) {
    .white-header {
        padding: 8px 0;
    }

    .white-header-content {
        padding: 0 8px;
        min-height: 50px;
    }

    .header-left {
        left: 8px;
        gap: 6px;
    }

    .logo-img-small {
        width: 40px;
        height: 40px;
        padding: 2px;
    }

    .header-center {
        max-width: calc(100% - 120px);
    }

    .header-center h1 {
        font-size: 1.1rem;
        letter-spacing: 0;
        margin-bottom: 1px;
    }

    .header-center p {
        font-size: 0.7rem;
    }

    /* Minimal spacing for very narrow screens */
    .direct-form-fields {
        gap: 10px;
        padding: 8px 5px;
    }

    .form-column {
        gap: 8px;
    }

    .direct-input,
    .direct-select {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .direct-radio-simple {
        padding: 6px 0;
    }

    .time-radio-container {
        gap: 2px;
    }

    .time-radio-container .direct-radio-simple {
        padding: 4px 0;
    }
}