/* Shareholders Satisfaction Survey Page Styles */

.survey-section {
    background-color: #f3f4f6;
    padding: 80px 0;
    min-height: 600px;
}

.survey-container {
    max-width: 950px;
    margin: 0 auto;
    padding: 0 20px;
}

.survey-card {
    background-color: var(--white);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 30px rgba(8, 29, 58, 0.05);
}

.survey-intro {
    font-size: 15px;
    line-height: 1.65;
    color: var(--muted);
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1.5px solid var(--line);
}

/* Form Layout Grids */
.survey-form {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-row.full-width {
    grid-template-columns: 1fr;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.form-group label span.required {
    color: var(--red);
    margin-left: 3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #dbe2ee;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    color: var(--navy);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-group input:focus {
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 3px rgba(30, 79, 191, 0.1);
}

/* OR separator styling between Folio Number and DP ID */
.folio-or-dp-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 15px;
}

.or-divider {
    font-size: 14px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    text-align: center;
    padding-bottom: 14px;
    letter-spacing: 0.5px;
}

/* Service Rating Grid Table styling */
.rating-area-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 20px;
    margin-top: 15px;
    border-left: 4px solid var(--blue);
    padding-left: 12px;
}

.ratings-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    margin-bottom: 10px;
}

.ratings-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}

.ratings-table th {
    background-color: var(--light);
    color: var(--navy);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px;
    border-bottom: 2px solid var(--line);
    text-align: center;
}

.ratings-table th:first-child {
    text-align: left;
    width: 50%;
}

.ratings-table td {
    padding: 18px 16px;
    border-bottom: 1px solid var(--line);
    text-align: center;
    font-size: 14.5px;
    color: var(--text);
    vertical-align: middle;
}

.ratings-table tr:last-child td {
    border-bottom: 0;
}

.ratings-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.4;
}

.ratings-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.ratings-table input[type="radio"] {
    accent-color: var(--blue-accent);
    width: 19px;
    height: 19px;
    cursor: pointer;
}

/* Conditionally styled sections (grievance detail field) */
.conditional-field {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, margin-top 0.3s ease;
    margin-top: 0;
}

.conditional-field.show {
    max-height: 180px;
    margin-top: 18px;
}

/* Textarea controls */
.form-group textarea {
    width: 100%;
    min-height: 100px;
    padding: 13px 16px;
    border: 1.5px solid #dbe2ee;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    color: var(--navy);
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-group textarea:focus {
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 3px rgba(30, 79, 191, 0.1);
}

/* Radio buttons container for standard form options */
.radio-options-row {
    display: flex;
    gap: 30px;
    margin-top: 5px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
}

.radio-option input[type="radio"] {
    accent-color: var(--blue-accent);
    width: 19px;
    height: 19px;
    cursor: pointer;
}

/* Captcha Block */
.captcha-container {
    background-color: #f8fafc;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.captcha-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.captcha-code {
    background-color: #e2e8f0;
    padding: 12px 24px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 5px;
    font-family: 'Courier New', Courier, monospace;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
    color: #1e293b;
    user-select: none;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.7), -1px -1px 1px rgba(0,0,0,0.1);
    /* Distort security overlay style */
    background-image: radial-gradient(circle, rgba(148, 163, 184, 0.15) 15%, transparent 16%), radial-gradient(circle, rgba(148, 163, 184, 0.15) 15%, transparent 16%);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
}

.captcha-refresh-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--blue-accent);
    cursor: pointer;
    transition: transform 0.3s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.captcha-refresh-btn:hover {
    background-color: #e2e8f0;
    color: var(--blue);
}

.captcha-refresh-btn.spinning {
    transform: rotate(360deg);
}

.captcha-input-group {
    flex: 1;
}

/* Submit row button */
.btn-submit-row {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.btn-submit-row button.btn-yellow {
    width: 220px;
    height: 52px;
    font-size: 14px;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit-row button.btn-yellow:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(242, 173, 0, 0.3);
}

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

/* Success Card Styling */
.success-state {
    display: none;
    text-align: center;
    padding: 30px 10px;
}

.success-state.show {
    display: block;
    animation: fadeIn 0.5s ease-out forwards;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #22c55e;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.2);
    transform: scale(0);
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}

.success-state h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 12px;
}

.success-state p {
    color: var(--muted);
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.success-state button.btn-blue {
    min-width: 180px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    to { transform: scale(1); }
}

/* Validation Alert styling */
.form-alert {
    background-color: #fef2f2;
    border: 1.5px solid #fca5a5;
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 600;
    margin-bottom: 30px;
    display: none;
}

/* Responsive styles */
@media (max-width: 768px) {
    .survey-card {
        padding: 30px 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .folio-or-dp-row {
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: stretch;
    }
    
    .or-divider {
        padding-bottom: 0;
        margin: 5px 0;
    }
    
    .captcha-container {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .captcha-display {
        justify-content: center;
    }

    .ratings-table th, .ratings-table td {
        padding: 12px 10px;
        font-size: 13.5px;
    }
}

@media (max-width: 568px) {
    /* Stack ratings table questions into cards for mobile readability */
    .ratings-table-container {
        border: none;
    }
    
    .ratings-table {
        display: block;
        min-width: auto;
    }
    
    .ratings-table thead {
        display: none; /* Hide header columns */
    }
    
    .ratings-table tbody {
        display: block;
    }
    
    .ratings-table tr {
        display: block;
        background-color: #f8fafc;
        border: 1.5px solid var(--line);
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .ratings-table tr:nth-child(even) {
        background-color: #f8fafc;
    }
    
    .ratings-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid rgba(219, 226, 238, 0.5);
        text-align: right;
    }
    
    .ratings-table td:first-child {
        display: block;
        text-align: left;
        font-weight: 700;
        padding-top: 0;
        padding-bottom: 12px;
        border-bottom: 1.5px solid var(--line);
    }
    
    .ratings-table td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }
    
    /* Mobile radio tags label styling */
    .ratings-table td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 12px;
        color: var(--muted);
        text-transform: uppercase;
        text-align: left;
    }
}

/* Survey-specific banner image */
.hero-art.survey {
    background-image: url("../images/survey-banner.png");
    background-size: cover;
    background-position: right center;
}
