/* HR Schedule Management - Styles */
#hr-schedule-container {
    max-width: 100%;
    margin: 20px auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    direction: rtl;
}

/* Header Styles */
.hr-schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #8b0628 0%, #6a041f 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(139, 6, 40, 0.3);
    flex-wrap: wrap;
    gap: 15px;
}

.hr-schedule-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
}

.header-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.filter-group label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 14px;
}

.filter-select {
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.filter-select:focus {
    outline: none;
    border-color: #8b0628;
    box-shadow: 0 0 0 3px rgba(139, 6, 40, 0.1);
}

/* Calendar Wrapper */
#hr-calendar-wrapper {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.calendar-info {
    background: #f7bf0047;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #8b0628;
}

.calendar-info .info-text {
    margin: 0;
    color: #8b0628;
    font-size: 14px;
}

/* Calendar Styles */
#hr-calendar {
    width: 100%;
    direction: rtl;
    min-height: 600px;
}

/* Ensure calendar body is visible */
#hr-calendar .fc-view-harness {
    min-height: 500px;
}

/* Calendar table structure */
#hr-calendar .fc-timegrid {
    width: 100%;
}

#hr-calendar .fc-scrollgrid {
    border: 1px solid #ddd;
}

/* No Selection Message */
.no-selection {
    background: white;
    padding: 60px 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.message-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.message-content .emoji {
    font-size: 60px;
}

.message-content p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: #8b0628;
    color: white;
}

.btn-primary:hover {
    background: #6a041f;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.emoji {
    font-size: 16px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    max-width: 600px;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #8b0628 0%, #6a041f 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 22px;
}

.close-modal {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-modal:hover {
    transform: scale(1.2);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 25px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 14px;
}

.form-input {
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #8b0628;
    box-shadow: 0 0 0 3px rgba(139, 6, 40, 0.1);
}

.form-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* FullCalendar RTL Adjustments */
.fc-direction-rtl .fc-timegrid-slot-label-frame {
    text-align: center;
    font-size: 12px;
}

.fc .fc-toolbar.fc-header-toolbar {
    display: flex;
    flex-direction: row;
}

/* Hide scrollbar for calendar */
.fc-scroller::-webkit-scrollbar {
    display: none;
}

.fc-scroller {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Event Styles */
.fc-event {
    cursor: pointer;
    border: none;
    padding: 5px;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9em;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.fc-event:hover {
    opacity: 0.8;
}

/* Interview Modal Specific Styles */
.interview-details-container {
    max-height: 70vh;
    overflow-y: auto;
}

.info-section {
    padding: 20px 25px;
    border-bottom: 1px solid #e1e5e9;
}

.info-section:last-child {
    border-bottom: none;
}

.info-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: bold;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.info-grid div {
    font-size: 14px;
    color: #555;
}

.info-grid strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 4px;
}

.form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #8b0628;
    box-shadow: 0 0 0 3px rgba(139, 6, 40, 0.1);
}

.form-textarea:readonly {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.completed-badge {
    background: #f0e6ff;
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #6f42c1;
}

.modal-body {
    padding: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hr-schedule-header {
        flex-direction: column;
        text-align: center;
    }

    .header-controls {
        width: 100%;
        justify-content: center;
    }

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

    #hr-calendar .fc-header-toolbar {
        flex-direction: column;
    }

    #hr-calendar .fc-toolbar-title {
        font-size: 1em;
    }

    #hr-calendar .fc-button {
        font-size: 0.8em;
        padding: 4px 8px;
    }
}

/* SweetAlert2 Custom Styling */
.swal2-popup {
    direction: rtl;
}

.swal2-title {
    color: #2c3e50;
}

.swal2-confirm {
    background: #8b0628 !important;
}

.swal2-confirm:hover {
    background: #6a041f !important;
}

/* FullCalendar v6 injects its base CSS at runtime, so keep key overrides scoped */
#hr-calendar .fc-direction-rtl .fc-timegrid-slot-label-frame {
    text-align: center;
    font-size: 12px;
}

#hr-calendar .fc-toolbar.fc-header-toolbar {
    display: flex;
    flex-direction: row;
}

#hr-calendar .fc-event {
    cursor: pointer;
    border: none;
    padding: 5px;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9em;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#hr-calendar .fc-event:hover {
    opacity: 0.8;
}
