/* Consolidated Questionnaire/form CSS - single definitions only */

/* Error and Success Messages */
.fc-error-message {
    color: #d63638;
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
}

.fc-success-message {
    color: #0b7b3a;
    padding: 18px 22px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    margin: 16px 0;
    text-align: center;
}

.fc-success-message h2 { margin: 0 0 12px 0; color: #155724; }
.fc-success-message p { margin: 0; font-size: 1em; }

/* Main Container */
.fc-questionnaire-container {
    max-width: 720px;
    margin: 24px auto;
    padding: 24px;
    border: 1px solid #e6eaee;
    border-radius: 10px;
    background: #ffffff;
}

/* Header */
.fc-questionnaire-header { text-align: center; margin-bottom: 32px; }
.fc-questionnaire-header h1 { color:#1d2327; margin:0 0 10px 0; font-size:2.25em; font-weight:700 }
.fc-questionnaire-header p { color:#666; font-size:1.05em; margin:0; line-height:1.5 }

/* Questions container */
.fc-questions-container { display:flex; flex-direction:column; gap:24px }
.fc-question-card { background:#fff; border:1px solid #e9eef2; border-radius:10px; padding:22px; box-shadow:0 4px 8px rgba(0,0,0,0.04) }

.fc-question-header { margin-bottom:14px }
.fc-question-header h3 { margin:0; font-size:1.05em; font-weight:600; color:#1d2327; display:flex; gap:12px; align-items:flex-start }
.fc-question-header h3 span:first-child { background:linear-gradient(135deg,#00967a,#01856c); color:#fff; border-radius:50%; min-width:30px; height:30px; display:flex; align-items:center; justify-content:center; font-weight:600; font-size:0.75em }

/* Answers */
.fc-answers-container { display:flex; flex-direction:column; gap:8px }
.fc-answer-option { display:flex; gap:12px; align-items:center; padding:12px; border:1px solid #e9eef2; border-radius:8px; background:#fafbfd; cursor:pointer }
.fc-answer-option input[type="radio"] { margin:0 12px 0 0; width:18px; height:18px; accent-color:#00967a }
.fc-answer-option span:first-of-type { flex:1; font-size:1em; color:#1d2327 }
.fc-answer-option span:last-of-type { background:#f0f2f5; color:#666; padding:4px 10px; border-radius:20px; font-size:0.82em }

.fc-no-answers { color:#d63638; padding:14px; background:#fff0f1; border:1px solid #f5c6cb; border-radius:8px; text-align:center }

/* Form actions */
.fc-form-actions { text-align:center; margin-top:30px; padding-top:18px; border-top:1px solid #eef3f6 }
.fc-submit-button { background:#00967a; color:#fff; border:none; padding:10px 22px; border-radius:50px; font-size:1em; font-weight:600; cursor:pointer; box-shadow:0 6px 18px rgba(0,150,122,0.18); min-width:140px }
.fc-submit-button:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,150,122,0.22); background:#01866e }
.fc-submit-button:active { transform:none }
.fc-submit-button.fc-loading, .fc-submit-button:disabled { opacity:0.7; cursor:not-allowed }
.fc-submit-button.fc-loading .fc-button-loading { display:inline-flex } .fc-submit-button.fc-loading .fc-button-text { display:none }

/* Modal */
.fc-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.6); display:none; align-items:center; justify-content:center; z-index:10000; padding:20px }
.fc-modal-overlay.active { display:flex }
.fc-modal-content { background:#fff; border-radius:12px; box-shadow:0 12px 40px rgba(0,0,0,0.25); max-width:420px; width:100%; position:relative }
.fc-modal-body { padding:20px 30px; text-align:center }
.fc-modal-message { margin:0 0 16px 0; color:#333; font-size:18px; font-weight:600 }
.fc-modal-actions { display:flex; justify-content:center; gap:12px }
.fc-login-button { display:inline-block; padding:10px 28px; background:#00967a; color:#fff; border-radius:8px; text-decoration:none; font-weight:600 }
.fc-login-button:hover { background:#01866e }

/* Mobile */
@media (max-width:768px) {
    .fc-questionnaire-container{ padding:12px }
    .fc-question-card{ padding:18px }
    .fc-answer-option{ padding:10px }
    .fc-submit-button{ width:100%; padding:16px }
}
@media (max-width:480px) {
    .fc-modal-content{ margin:12px; width:calc(100% - 24px) }
    .fc-modal-body{ padding:18px }
    .fc-login-button{ padding:12px 20px }
}

/* Defensive resets for answers container to avoid theme margins */
.fc-answers-container br{ display:none !important }
.fc-answers-container .fc-answer-option, .fc-answers-container .fc-answer-option label { margin:0 !important }

/* Response view */
.fc-questionnaire-response-view .fc-response-header-card{ padding:12px; border-radius:8px; background:#f7f9fb; border:1px solid #e6eef5; margin-bottom:18px }
.fc-questionnaire-response-view .fc-response-row{ display:table; width:100%; border-collapse:collapse }
.fc-questionnaire-response-view .fc-response-cell{ display:table-cell; vertical-align:top; padding:8px 12px }
.fc-questionnaire-response-view .fc-response-cell.responder{ width:40% }
.fc-questionnaire-response-view .fc-response-cell.questionnaire{ width:40% }
.fc-questionnaire-response-view .fc-response-cell.manager{ width:20%; text-align:right }
.fc-questionnaire-response-view .fc-response-title{ font-size:14px; color:#555; margin-bottom:6px; font-weight:600 }
.fc-questionnaire-response-view .fc-response-name{ font-size:16px; color:#222; font-weight:700 }
.fc-questionnaire-response-view .fc-response-sub{ font-size:13px; color:#666; margin-top:6px }
.fc-questionnaire-response-view .fc-response-note{ font-size:12px; color:#888; margin-top:6px }

@media (max-width:768px){
    .fc-questionnaire-response-view .fc-response-row{ display:block }
    .fc-questionnaire-response-view .fc-response-cell{ display:block; width:100%; padding:10px }
}

/* Error and Success Messages */
.fc-error-message {
    .fc-modal-body {
        /* reduced top/bottom padding to tighten spacing above/below actions */
        padding: 20px 30px;
        text-align: center;
    }

    .fc-modal-message {
        margin: 0 0 16px 0;
        color: #333;
        font-size: 18px;
        font-weight: 600;
        line-height: 1.4;
    }

    .fc-modal-actions {
        display: flex;
        justify-content: center;
    }

    .fc-login-button {
        display: inline-block;
        padding: 10px 28px;
        background: #00967a;
        color: white;
        text-decoration: none;
        font-weight: 600;
        font-size: 16px;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0, 150, 122, 0.3);
    }
}

.fc-questionnaire-header h1 {
    color: #1d2327;
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
}

.fc-questionnaire-header p {
    color: #666;
    font-size: 1.1em;
    margin: 0;
    line-height: 1.6;
}

/* Questions Container */
.fc-questions-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Question Card */
.fc-question-card {
    background: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
}

/* Question Header */
.fc-question-header {
    margin-bottom: 20px;
}

.fc-question-header h3 {
    color: #1d2327;
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.fc-question-header h3 span:first-child {
    background: linear-gradient(135deg, #00967a, #01856c);
    color: white;
    border-radius: 50%;
    min-width: 32px;
    height: 32px;
    font-weight: 600;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-question-header h3 span:last-child {
    flex: 1;
    line-height: 1.4;
    padding-top: 2px;
}

/* Answer Option */
.fc-answer-option {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.fc-answer-option input[type="radio"] {
    margin: 0 15px 0 0;
    width: 18px;
    height: 18px;
    accent-color: #00967a;
}

.fc-answer-option span:first-of-type {
    flex: 1;
    font-size: 1em;
    color: #1d2327;
}

.fc-answer-option span:last-of-type {
    background: #f0f2f5;
    color: #666;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 400;
}

/* No Answers Message */
.fc-no-answers {
    color: #d63638;
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
}

/* Form Actions */
.fc-form-actions {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid #e1e5e9;
}

/* Submit Button */
.fc-submit-button {
    background: #00967a !important;
    color: white !important;
    border: none !important;
    padding: 10px 22px;
    border-radius: 50px !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 163, 42, 0.3);
    transition: all 0.3s ease;
    min-width: 140px;
    display: flex;
    align-items: center;
    .fc-modal-body {
        /* reduced top/bottom padding to tighten spacing above/below actions */
        padding: 20px 30px;
        text-align: center;
    }
    .fc-modal-message {
        margin: 0 0 16px 0;
        color: #333;
        font-size: 18px;
        font-weight: 600;
        line-height: 1.4;
    }
}

/* Answer option interactions */
.fc-answer-option:hover {
    border-color: #00967a;
    background: #f0f7ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
}

.fc-answer-option input[type="radio"]:checked + span + span {
    background: #00967a;
    color: white;
}

.fc-answer-option:has(input[type="radio"]:checked) {
    border-color: #00967a;
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Submit button interactions */
.fc-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 163, 42, 0.4);
    background: #01866e !important;
}

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

/* Loading state for submit button */
.fc-submit-button.fc-loading {
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    transform: none !important;
}

.fc-submit-button:disabled {
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    transform: none !important;
}

.fc-submit-button:disabled:hover {
    transform: none !important;
    box-shadow: 0 4px 15px rgba(0, 163, 42, 0.3) !important;
}

/* Button text and loading states */
.fc-button-text,
.fc-button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.fc-button-loading {
    align-items: center;
}

/* Login Modal Styles - Simple Card Design */
.fc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.fc-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    position: relative;
}

.fc-modal-body {
    padding: 40px 30px;
    text-align: center;
}

.fc-modal-message {
    margin: 0 0 30px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.fc-modal-actions {
    display: flex;
    justify-content: center;
}

.fc-login-button {
    display: inline-block;
    padding-top: 0;
    background: #00967a;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 150, 122, 0.3);
}

.fc-login-button:hover {
    background: #01866e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 150, 122, 0.4);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .fc-questionnaire-container {
        padding: 8px;
        margin: 0;
    }

    .fc-questionnaire-header h1 {
        font-size: 2em;
    }

    .fc-question-card {
        padding: 20px;
    }

    .fc-answer-option {
        padding: 12px;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .fc-answer-option input[type="radio"] {
        margin: 0;
    }

    .fc-answer-option span:last-of-type {
        width: fit-content;
        margin-top: 4px;
    }

    .fc-submit-button {
        width: 100%;
        padding: 18px;
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .fc-questionnaire-header h1 {
        font-size: 1.8em;
    }

    .fc-question-card {
        padding: 16px;
    }

    .fc-answer-option {
        padding: 10px;
        gap: 4px;
    }

    .fc-modal-content {
        margin: 20px;
        width: calc(100% - 40px);
        max-width: none;
    }

    .fc-modal-body {
        padding: 30px 20px;
    }

    .fc-modal-message {
        font-size: 16px;
        margin-bottom: 25px;
    }

/* Reduce unexpected gaps between answer labels and hide stray <br> */
.fc-answers-container br {
    display: none !important;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.fc-answers-container .fc-answer-option {
    margin: 0 0 6px 0 !important; /* small controlled gap */
}

.fc-answers-container .fc-answer-option:last-child {
    margin-bottom: 0 !important;
}

/* Defensive: ensure labels don't inherit large margins from theme */
.fc-answers-container .fc-answer-option,
.fc-answers-container .fc-answer-option label {
    margin: 0 !important;
}

    .fc-login-button {
        padding: 12px 24px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Overrides and response view styles (appended for backward-compatibility) */
.fc-modal-overlay{display:none !important}
.fc-modal-overlay.active{display:flex !important}
.fc-button-loading{display:none !important}

/* When the submit button has .fc-loading, show loading text and hide normal text */
.fc-submit-button.fc-loading .fc-button-loading { display: inline-flex !important; }
.fc-submit-button.fc-loading .fc-button-text { display: none !important; }

/* Header card as bordered table */
.fc-questionnaire-response-view .fc-response-header-card{
    padding:0 !important;
    border-radius:8px !important;
    background:transparent !important;
    border:1px solid #e1e5e9 !important;
    margin-bottom:18px !important;
    overflow:hidden !important;
}
.fc-questionnaire-response-view .fc-response-row{display:table !important;width:100% !important;border-collapse:collapse !important}
.fc-questionnaire-response-view .fc-response-cell{display:table-cell !important;vertical-align:top !important;padding:14px 16px !important;background:#fff !important;border-right:1px solid #e9ecef !important;border-top:1px solid #e9ecef !important;border-bottom:1px solid #e9ecef !important}
.fc-questionnaire-response-view .fc-response-cell.responder{width:40% !important}
.fc-questionnaire-response-view .fc-response-cell.questionnaire{width:40% !important}
.fc-questionnaire-response-view .fc-response-cell.manager{width:20% !important;text-align:right !important;border-right:none !important}
.fc-questionnaire-response-view .fc-response-title{font-size:14px !important;color:#555 !important;margin-bottom:6px !important;font-weight:600 !important}
.fc-questionnaire-response-view .fc-response-name{font-size:16px !important;color:#222 !important;font-weight:700 !important}
.fc-questionnaire-response-view .fc-response-sub{font-size:13px !important;color:#666 !important;margin-top:6px !important}
.fc-questionnaire-response-view .fc-response-note{font-size:12px !important;color:#888 !important;margin-top:6px !important}
.fc-manager-name{font-size:15px !important;color:#222 !important;font-weight:600 !important}

/* Add subtle separators inside cells */
.fc-questionnaire-response-view .fc-response-cell + .fc-response-cell{border-left:1px solid #f1f4f6 !important}

@media (max-width:768px){
    .fc-questionnaire-response-view .fc-response-row{display:block !important}
    .fc-questionnaire-response-view .fc-response-cell{display:block !important;width:100% !important;max-width:100% !important;padding:12px 14px !important;border-right:none !important;border-left:none !important}
    .fc-questionnaire-response-view .fc-response-cell + .fc-response-cell{border-top:1px solid #e9ecef !important;margin-top:0 !important;padding-top:12px !important}
    .fc-questionnaire-response-view .fc-response-name{font-size:15px !important}
    .fc-questionnaire-response-view .fc-response-title{font-size:13px !important}
}

.fc-response-item{border:1px solid #e9ecef !important;padding:12px !important;border-radius:6px !important;margin-bottom:10px !important;background:#fff !important}
.fc-response-question{font-weight:600 !important;margin-bottom:6px !important}
.fc-response-qtext{margin-bottom:6px !important;color:#333 !important}
.fc-response-answer{color:#00695c !important;font-weight:600 !important}
.fc-response-note-general{margin-top:20px !important;color:#666 !important}

.fc-personality-desc{font-size:13px !important;color:#444 !important;margin-top:6px !important;display:inline-block !important;margin:0 !important;padding:0 !important}
.fc-personality-desc-text{white-space:normal !important;margin:0 !important;padding:0 !important;display:inline !important;color:#333 !important}

/* Ensure specific header columns are full width on small screens */
@media (max-width:768px) {
    .fc-questionnaire-response-view .fc-response-cell.responder,
    .fc-questionnaire-response-view .fc-response-cell.questionnaire,
    .fc-questionnaire-response-view .fc-response-cell.manager {
        width:100% !important;
        max-width:100% !important;
        display:block !important;
    }
}

.fc-questionnaire-response-view .fc-response-header-card{padding:12px !important;border-radius:8px !important;background:#f7f9fb !important;border:1px solid #e6eef5 !important;margin-bottom:18px !important}
.fc-questionnaire-response-view .fc-response-row{display:table !important;width:100% !important;border-collapse:collapse !important}
.fc-questionnaire-response-view .fc-response-cell{display:table-cell !important;vertical-align:top !important;padding:8px 12px !important}
.fc-questionnaire-response-view .fc-response-cell.responder{width:40%}
.fc-questionnaire-response-view .fc-response-cell.questionnaire{width:40%}
.fc-questionnaire-response-view .fc-response-cell.manager{width:20%;text-align:right !important}
.fc-questionnaire-response-view .fc-response-title{font-size:14px !important;color:#555 !important;margin-bottom:6px !important;font-weight:600 !important}
.fc-questionnaire-response-view .fc-response-name{font-size:16px !important;color:#222 !important;font-weight:400 !important}
.fc-questionnaire-response-view .fc-response-sub{font-size:13px !important;color:#666 !important;margin-top:6px !important}
.fc-questionnaire-response-view .fc-response-note{font-size:12px !important;color:#888 !important;margin-top:6px !important}
.fc-manager-name{font-size:15px !important;color:#222 !important;font-weight:600 !important}
@media (max-width:768px){
    .fc-questionnaire-response-view .fc-response-row{display:block !important}
    .fc-questionnaire-response-view .fc-response-cell{display:block !important;width:100% !important;padding:10px 6px !important}
    .fc-questionnaire-response-view .fc-response-cell + .fc-response-cell{border-top:1px solid #e6eef5 !important;margin-top:8px !important;padding-top:10px !important}
    .fc-questionnaire-response-view .fc-response-name{font-size:15px !important}
    .fc-questionnaire-response-view .fc-response-title{font-size:13px !important}
}

.fc-response-item{border:1px solid #e9ecef !important;padding:12px !important;border-radius:6px !important;margin-bottom:10px !important;background:#fff !important}
.fc-response-question{font-weight:600 !important;margin-bottom:6px !important}
.fc-response-qtext{margin-bottom:6px !important;color:#333 !important}
.fc-response-answer{color:#00695c !important;font-weight:600 !important}
.fc-response-note-general{margin-top:20px !important;color:#666 !important}

.fc-personality-desc{font-size:13px !important;color:#444 !important;margin-top:6px !important}
.fc-personality-desc-text{white-space:pre-wrap !important;margin-top:6px !important;color:#333 !important}
