/**
 * Front-end Styles for HMTA Employee Form (Persian RTL)
 */

.hmta-form-container {
    direction: rtl;
    text-align: right;
    font-family: Tahoma, "Vazirmatn", "Segoe UI", sans-serif;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin: 20px auto;
    max-width: 1000px;
    box-sizing: border-box;
}

/* Stepper Progress Bar */
.hmta-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    white-space: nowrap;
    border: 1px solid #edf2f7;
}

.hmta-step-indicator {
    flex: 1;
    text-align: center;
    position: relative;
    font-size: 11px;
    color: #718096;
    padding: 5px 10px;
    font-weight: bold;
    min-width: 70px;
}

.hmta-step-indicator .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #cbd5e0;
    color: #ffffff;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: bold;
}

.hmta-step-indicator.active {
    color: #2b6cb0;
}

.hmta-step-indicator.active .step-num {
    background: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
}

.hmta-step-indicator.completed {
    color: #38a169;
}

.hmta-step-indicator.completed .step-num {
    background: #38a169;
}

/* Steps and Grids */
.hmta-step-content {
    display: none;
}

.hmta-step-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

.hmta-step-title {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #edf2f7;
    font-weight: bold;
}

.hmta-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.hmta-col-12 { grid-column: span 12; }
.hmta-col-6  { grid-column: span 6; }
.hmta-col-4  { grid-column: span 4; }
.hmta-col-3  { grid-column: span 3; }

@media (max-width: 768px) {
    .hmta-col-6, .hmta-col-4, .hmta-col-3 {
        grid-column: span 12;
    }
    .hmta-stepper {
        justify-content: flex-start;
    }
}

/* Form Controls */
.hmta-label {
    display: block;
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 6px;
    font-weight: bold;
}

.hmta-label .required {
    color: #e53e3e;
    margin-right: 3px;
}

.hmta-input, .hmta-select, .hmta-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 13px;
    color: #2d3748;
    background: #fff;
    box-sizing: border-box;
    transition: all 0.2s;
}

.hmta-input:focus, .hmta-select:focus, .hmta-textarea:focus {
    border-color: #3182ce;
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.hmta-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Actions Footer */
.hmta-form-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
}

.hmta-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hmta-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.hmta-btn-secondary:hover {
    background: #cbd5e0;
}

.hmta-btn-primary {
    background: #3182ce;
    color: #ffffff;
}

.hmta-btn-primary:hover {
    background: #2b6cb0;
}

.hmta-btn-success {
    background: #38a169;
    color: #ffffff;
}

.hmta-btn-success:hover {
    background: #2f855a;
}

.hmta-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Repeatable Sections */
.hmta-repeatable-section {
    background: #f7fafc;
    border: 1px dashed #cbd5e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.hmta-repeatable-row {
    position: relative;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.hmta-repeatable-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f7fafc;
}

.hmta-repeatable-row-title {
    font-size: 13px;
    color: #4a5568;
    font-weight: bold;
}

.hmta-btn-remove {
    background: #fed7d7;
    color: #9b2c2c;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
}

.hmta-btn-remove:hover {
    background: #feb2b2;
}

.hmta-btn-add {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #bee3f8;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hmta-btn-add:hover {
    background: #cee8ff;
}

/* Feedback & Alerts */
.hmta-alert {
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 20px;
}

.hmta-alert-danger {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
}

.hmta-alert-success {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    color: #22543d;
}

/* Tracking results styling */
.hmta-tracking-box {
    text-align: center;
    padding: 30px;
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
}

.hmta-tracking-code-display {
    font-size: 24px;
    font-weight: bold;
    color: #2f855a;
    letter-spacing: 2px;
    background: #ffffff;
    border: 2px dashed #38a169;
    padding: 10px 20px;
    border-radius: 6px;
    display: inline-block;
    margin: 15px 0;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 12px;
}

.status-submitted { background: #e2e8f0; color: #4a5568; }
.status-reviewing { background: #feebc8; color: #c05621; }
.status-approved { background: #c6f6d5; color: #22543d; }
.status-rejected { background: #fed7d7; color: #9b2c2c; }

/* Dynamic Summary Page */
.hmta-summary-block {
    margin-bottom: 25px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 15px;
}

.hmta-summary-block-title {
    font-size: 14px;
    font-weight: bold;
    color: #2d3748;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.hmta-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.hmta-summary-item {
    font-size: 12px;
    color: #4a5568;
}

.hmta-summary-item-label {
    font-weight: bold;
    color: #718096;
}

@media (max-width: 768px) {
    .hmta-summary-grid {
        grid-template-columns: 1fr;
    }
}
