@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: #333;
}

.ey-header {
    background: white;
    border-bottom: 4px solid #ffe600;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ey-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ey-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ey-logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: opacity 0.3s;
}

.ey-logo-link:hover {
    opacity: 0.8;
}

.ey-logo-image {
    height: 40px;
    width: auto;
}

.ey-app-name {
    font-size: 18px;
    font-weight: 600;
    color: #003366;
}

.ey-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.ey-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.ey-nav a:hover {
    color: #ffe600;
}

.ey-nav a i {
    font-size: 16px;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.questionnaire-header {
    background: white;
    padding: 40px;
    border-radius: 4px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.questionnaire-header h1 {
    color: #003366;
    margin-bottom: 15px;
    font-size: 28px;
}

.questionnaire-header .intro-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.questionnaire-header .highlight {
    background: #fff9e6;
    padding: 15px;
    border-left: 4px solid #ffe600;
    margin: 20px 0;
    border-radius: 2px;
}

.questionnaire-form {
    background: white;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 30px;
}

.form-section-title {
    background: #ffe600;
    color: #003366;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #003366;
}

/* Only apply to form input labels, not validation messages */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #003366;
}

.form-group.required label {
    font-weight: 600;
}

.form-group.required label::after {
    content: ' *';
    color: #d9534f;
}

/* jQuery Validation error labels - override inherited styles */
label.error {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 500 !important;
    color: #d9534f !important;
    font-size: 12px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

/* Block any pseudo-elements on error labels */
label.error::before,
label.error::after {
    display: none !important;
    content: none !important;
}

input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    margin-bottom: 8px;
}

/* Form control class styling */
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    margin-bottom: 8px;
    display: block;
    color: #333;
    background-color: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
.form-control:focus {
    outline: none;
    border-color: #ffe600;
    box-shadow: 0 0 4px rgba(255, 230, 0, 0.3);
}

.question-title {
    font-weight: 600;
    color: #003366;
    margin-bottom: 12px;
    font-size: 14px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.question-title::after {
    display: none;
}

/* Red asterisk for required questions */
.form-group.required .question-title::before {
    content: '';
}

.form-group.required .question-title {
    position: relative;
}

.question-note {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    font-style: italic;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.radio-option:hover {
    background-color: #f9f9f9;
    border-color: #ffe600;
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    cursor: pointer;
    accent-color: #ffe600;
    width: 18px;
    height: 18px;
}

.radio-option label {
    margin-bottom: 0 !important;
    flex: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: normal !important;
    color: #333 !important;
}

.radio-option label::after {
    display: none !important;
}

.radio-option input[type="radio"]:checked ~ label {
    color: #ffe600;
    font-weight: 600;
}

/* IMPORTANT: Hide jQuery Validation error labels that appear in radio groups */
/* These are created by errorPlacement but we want to use .validation-message instead */
.radio-group label.error {
    display: none !important;
}

.submit-button {
    background: #ffe600;
    color: #003366;
    padding: 14px 40px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.submit-button:hover {
    background: #ffcc00;
}

.result-box {
    background: white;
    border: 2px solid #ffe600;
    border-radius: 4px;
    padding: 30px;
    margin-top: 30px;
}

.result-box h1,
.result-box h2 {
    color: #003366;
    margin-bottom: 15px;
    font-size: 24px;
}

.result-score {
    color: #ffe600;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 20px;
}

.result-content {
    color: #555;
    line-height: 1.7;
    margin: 20px 0;
}

.button-back {
    display: inline-block;
    margin-top: 20px;
    background: #ffe600;
    color: #003366;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s;
}

.button-back:hover {
    background: #ffcc00;
}

.footer {
    background: white;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #999;
    font-size: 12px;
}

.validation-error {
    color: #d9534f;
    font-size: 13px;
    margin-top: 5px;
}

.validation-message {
    display: none;
    color: #d9534f !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    width: 100%;
    clear: both;
    background: none;
    border: none;
    padding: 0;
}

/* Validation message text - override any inherited styles */
.validation-message::before,
.validation-message::after {
    display: none !important;
}

/* Bootstrap button overrides - EY branding */
.btn-primary {
    background-color: #ffe600 !important;
    border-color: #ffe600 !important;
    color: #003366 !important;
}

.btn-primary:hover {
    background-color: #ffcc00 !important;
    border-color: #ffcc00 !important;
    color: #003366 !important;
}

.btn-primary:focus {
    background-color: #ffcc00 !important;
    border-color: #ffcc00 !important;
    color: #003366 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 230, 0, 0.5) !important;
}

.btn-primary:active {
    background-color: #ffb300 !important;
    border-color: #ffb300 !important;
}

.btn-warning {
    background-color: #ffe600 !important;
    border-color: #ffe600 !important;
    color: #003366 !important;
}

.btn-warning:hover {
    background-color: #ffcc00 !important;
    border-color: #ffcc00 !important;
    color: #003366 !important;
}

.btn-warning:focus {
    background-color: #ffcc00 !important;
    border-color: #ffcc00 !important;
    color: #003366 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 230, 0, 0.5) !important;
}

.btn-warning:active {
    background-color: #ffb300 !important;
    border-color: #ffb300 !important;
}

.validation-message.error-visible {
    display: block !important;
}

/* Ensure validation message is always visible when it has text */
.validation-message:not(:empty) {
    display: block !important;
}

.consent-group {
    background: #f9f9f9;
    padding: 15px;
    border-left: 4px solid #ffe600;
    border-radius: 4px;
    margin: 20px 0;
}

.consent-group label {
    display: flex !important;
    align-items: flex-start;
    font-weight: normal !important;
    color: #333 !important;
    margin-bottom: 0 !important;
}

.consent-group label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.consent-group label span {
    display: inline;
    font-weight: normal;
    color: #333;
    line-height: 1.5;
}

.consent-group label::after {
    display: none !important;
}

.consent-group a {
    color: #ffe600;
    text-decoration: none;
    display: inline;
    word-break: break-word;
}

.consent-group a:hover {
    text-decoration: underline;
}

.consent-group a i {
    margin-left: 4px;
    font-size: 0.85em;
}

@media (max-width: 768px) {
    .questionnaire-header,
    .questionnaire-form {
        padding: 20px;
    }

    .questionnaire-header h1 {
        font-size: 22px;
    }
}
