/* emp_form.css */
:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #333;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --border-radius: 6px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: #f9f9f9;
    padding: 20px;
}

.form-container {
    max-width: 90%;
    margin: 10px auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.form-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
}

.form-header h1 {
    font-size: 24px;
    font-weight: 500;
}

.progress-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 30px 50px;
}

.progress-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--medium-gray);
    transform: translateY(-50%);
    z-index: 1;
}

.progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    background: var(--success-color);
    transform: translateY(-50%);
    z-index: 2;
    transition: var(--transition);
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--medium-gray);
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    transition: var(--transition);
}

.step.active {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.step.completed {
    background: var(--success-color);
    color: white;
}

.step-label {
    position: absolute;
    top: 45px;
    font-size: 12px;
    color: var(--dark-gray);
    white-space: nowrap;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--primary-color);
    font-weight: 500;
}

.form-step {
    display: none;
    padding: 30px;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.section-title {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--medium-gray);
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-col {
    flex: 1;
    min-width: 250px;
    padding: 0 30px;
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
}

.radio-option input {
    margin-right: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

tr:nth-child(even) {
    background-color: var(--light-gray);
}

tr:hover {
    background-color: #f0f0f0;
}

.photo-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

#fileDisplayArea {
    width: 150px;
    height: 180px;
    border: 2px dashed var(--medium-gray);
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    overflow: hidden;
    background-color: white;
}

#fileDisplayArea img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.file-input-label {
    display: inline-block;
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.file-input-label:hover {
    background-color: var(--secondary-color);
}

#tchpic {
    display: none;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-secondary {
    background-color: var(--medium-gray);
    color: var(--dark-gray);
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn i {
    margin-right: 8px;
}

.required-field::after {
    content: " *";
    color: var(--accent-color);
}

/* Additional styles for datepicker */
.ui-datepicker {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 1px;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ui-datepicker-header {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 2px;
}

.ui-datepicker-calendar th {
    background: blue;
}

.ui-datepicker-calendar .ui-state-active {
    background: var(--primary-color);
    color: white;
}

.datepicker-trigger {
    cursor: pointer;
    margin-left: -25px;
    color: #666;
}

.date-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.date-input-container input {
    padding-right: 30px;
}

.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

/* Additional styles for Instructions window */
.instructions {
    background-color: #e8f4fc;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.instructions h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 5px;
}

.success-message {
    color: #27ae60;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

/* Added style for date fields */
.date-field {
    cursor: pointer;
    background-color: #fff;
}

/* Validation styles */
.invalid-field {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
    background-color: #fff5f5 !important;
}

.invalid-radio-group {
    border: 2px solid #e74c3c !important;
    border-radius: 4px !important;
    padding: 8px !important;
    background-color: #fff5f5 !important;
}

.invalid-file-label {
    border: 2px solid #e74c3c !important;
    background-color: #fff5f5 !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.field-shake {
    animation: shake 0.5s ease-in-out;
}

/* Realtime-Validation */
.realtime-validation {
    margin-top: 4px;
    font-size: 0.8em;
    min-height: 1.2em;
}

.input-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2) !important;
}

.input-invalid {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
}

.validation-message {
    display: block;
    margin-top: 4px;
    font-size: 0.8em;
}

.validation-success {
    color: #28a745;
}

.validation-error {
    color: #e74c3c;
}

/* Real-time validation styles */
.validation-success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2) !important;
}

.validation-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

.validation-warning {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2) !important;
}

.validation-loading {
    border-color: #007bff !important;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2) !important;
}

/* Status message styles */
.status-message {
    font-size: 0.85em;
    margin-top: 5px;
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
}

.status-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.status-error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.status-warning {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
}

.status-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
}

/* File input validation */
.file-input-label.validation-error {
    border: 2px solid #dc3545 !important;
}

.file-input-label.validation-success {
    border: 2px solid #28a745 !important;
}

/* Radio group validation */
.radio-group.validation-error {
    border: 2px solid #dc3545 !important;
    border-radius: 4px;
    padding: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-col {
        min-width: 100%;
    }
    
    .progress-container {
        margin: 30px 20px;
    }
    
    .step-label {
        display: none;
    }
    
    .form-step {
        padding: 20px;
    }
    
    .form-row {
        margin: 0 -5px;
    }
    
    .form-col {
        padding: 0 5px;
    }
}