/**
 * KSIJ Madrasah Student Validation - Frontend Styles
 */

.ksij-validation-status {
    display: none;
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.ksij-validation-status.show {
    display: block;
}

.ksij-validation-status.validating {
    background: #f0f6fc;
    color: #0366d6;
    border: 1px solid #c8e1ff;
}

.ksij-validation-status.valid {
    background: #dcffe4;
    color: #22863a;
    border: 1px solid #34d058;
}

.ksij-validation-status.error {
    background: #ffeef0;
    color: #d73a49;
    border: 1px solid #f97583;
}

.ksij-validation-status.info {
    background: #fff8e1;
    color: #856404;
    border: 1px solid #ffc107;
}

.ksij-help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

input.ksij-validated {
    border-color: #34d058 !important;
    background-color: #f6fff8 !important;
}

input.ksij-error {
    border-color: #d73a49 !important;
    background-color: #fff5f5 !important;
}

/* Read-only / Locked field styles */
.ksij-prefill-notice {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 1px solid #81c784;
    border-left: 4px solid #4caf50;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #2e7d32;
}

.ksij-prefill-notice strong {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
}

.ksij-locked-notice {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #666;
}

input.ksij-readonly {
    background-color: #f5f5f5 !important;
    cursor: not-allowed !important;
    border-color: #ddd !important;
    color: #333 !important;
}

select.ksij-readonly {
    background-color: #f5f5f5 !important;
    cursor: not-allowed !important;
    border-color: #ddd !important;
    color: #333 !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.ksij-readonly-section label {
    cursor: not-allowed;
}

.ksij-readonly-section input[type="radio"]:disabled + label,
.ksij-readonly-section label:has(input[type="radio"]:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}

.ksij-readonly-selected {
    background-color: #e8f5e9 !important;
    border-radius: 4px;
    padding: 5px 10px;
}

.ksij-readonly-section input[type="radio"]:checked {
    accent-color: #4caf50;
}
