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

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #1a1a1a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 120px 20px 20px 20px;  /* Desktop: 100px top */
}

/* Container */
.email-wrapper {
    max-width: 600px;
    width: 100%;
    margin: 0;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* Header */
.header {
    background-color: #ffffff;
    padding: 32px 40px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 12px;
}

.logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: -30px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.main-title {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    text-align: center;
    text-transform: uppercase;
}

.tagline {
    font-size: 16px;
    color: #06bab5;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.3px;
    line-height: 1.4;
    text-align: center;
}

.char-count {
    font-size: 12px;
    margin-top: 2px;
    color: #ef4444; /* Red by default */
}

.char-count.valid {
    color: #22c55e; /* Green when valid */
}

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

.survey-intro {
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
    font-weight: 400;
    margin-bottom: 32px;
}

.survey-intro p {
    margin-bottom: 0;
}

/* Form Styling */
.question-group {
    margin-bottom: 32px;
}

.question-label {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.5;
}

.question-subtext {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
    font-style: italic;
}

.required {
    color: #ef4444;
    font-weight: 500;
}

/* Text Input (Email) - Made larger */
.text-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    color: #374151;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #ffffff;
    line-height: 1.5;
    min-height: 52px;
}

.text-input:focus {
    outline: none;
    border-color: #06bab5;
    box-shadow: 0 0 0 3px rgba(6, 186, 181, 0.1);
}

.text-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Other Explanation */
.other-explanation {
    margin-top: 16px;
    padding: 16px;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Divider */
.divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 32px 0;
}

/* Likert Scale */
.likert-scale {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid #e5e7eb;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.scale-options input[type="range"] {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    outline: none;
    margin-bottom: 16px;
    -webkit-appearance: none;
}

.scale-options input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #06bab5;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(6, 186, 181, 0.3);
    transition: all 0.2s ease;
}

.scale-options input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(6, 186, 181, 0.4);
}

.scale-numbers {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.selected-value {
    text-align: center;
    font-weight: 600;
    color: #06bab5;
    font-size: 16px;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #ffffff;
    font-size: 15px;
    font-weight: 400;
    color: #374151;
}

.radio-option:hover {
    border-color: #06bab5;
    background-color: #f0fdfc;
}

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

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked + .checkmark {
    background-color: #06bab5;
    border-color: #06bab5;
}

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

.radio-option input[type="radio"]:checked ~ span:not(.checkmark) {
    color: #06bab5;
    font-weight: 500;
}

/* Textarea */
textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    color: #374151;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #ffffff;
    line-height: 1.5;
}

textarea:focus {
    outline: none;
    border-color: #06bab5;
    box-shadow: 0 0 0 3px rgba(6, 186, 181, 0.1);
}

textarea::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Submit Section */
.submit-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.submit-btn {
    width: 100%;
    background-color: #06bab5;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.submit-btn:hover {
    background-color: #059892;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 186, 181, 0.3);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background-color: #9ca3af;
}

/* Message Cards */
.message-card {
    margin-top: 32px;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid;
}

.success-message {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

.error-message {
    background-color: #fef2f2;
    border-color: #fecaca;
}

.message-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.message-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.success-message .message-icon {
    background-color: #22c55e;
    color: white;
}

.error-message .message-icon {
    background-color: #ef4444;
    color: white;
}

.message-text strong {
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.success-message .message-text strong {
    color: #166534;
}

.error-message .message-text strong {
    color: #dc2626;
}

.message-text p {
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.success-message .message-text p {
    color: #15803d;
}

.error-message .message-text p {
    color: #dc2626;
}

/* Mobile Responsive */
@media only screen and (max-width: 640px) {
    body {
        padding: 60px 16px 16px 16px;  /* Top padding for mobile menu clearance */
    }

    .email-wrapper {
        margin: 20px 0;
        border-radius: 8px;
    }

    .header {
        padding: 24px 24px 20px;
    }

    .logo-section {
        gap: 12px;
    }

    .logo-img {
        width: 100px;
        height: 100px;
        margin-bottom: -25px;
    }

    .main-title {
        font-size: 28px;
    }

    .tagline {
        font-size: 14px;
    }

    .content {
        padding: 32px 24px 24px;
    }

    .survey-intro {
        font-size: 15px;
    }

    .question-label {
        font-size: 15px;
    }

    .radio-option {
        padding: 14px;
        font-size: 14px;
    }

    .likert-scale {
        padding: 20px;
    }

    .scale-numbers span {
        font-size: 11px;
    }

    .selected-value {
        font-size: 15px;
    }

    .char-count {
        font-size: 12px;
        margin-top: 2px;
        color: #ef4444; /* Red by default */
    }

    .char-count.valid {
        color: #22c55e; /* Green when valid */
    }

    .submit-btn {
        font-size: 15px;
        padding: 14px 20px;
    }

    /* Mobile text input adjustments */
    .text-input {
        padding: 10px;
        min-height: 48px;
        font-size: 16px;  /* Prevents iOS zoom */
    }
}

/* Print Styles */
@media print {
    .email-wrapper {
        box-shadow: none;
        margin: 0;
    }

    .header {
        background-color: transparent !important;
    }
}