/* OMSAR Breakdance - Recruitments element */
/* ------------------------------------------ */
/*         Recruitments Widget Styles         */
/* ------------------------------------------ */

.omsar-bd-recruitments-widget {
    width: 100%;
    background: transparent;
    font-family: var(--font-main, 'Inter', sans-serif);
}

/* Theme fonts — LTR: Inter (--font-main), RTL: Almarai (matches base.css + rtl.css) */
.omsar-bd-recruitments-widget .omsar-recruitment-filter-label,
.omsar-bd-recruitments-widget .omsar-recruitment-status-tab,
.omsar-bd-recruitments-widget .omsar-recruitment-title,
.omsar-bd-recruitments-widget .omsar-recruitment-badge,
.omsar-bd-recruitments-widget .omsar-recruitment-entity,
.omsar-bd-recruitments-widget .omsar-recruitment-dates,
.omsar-bd-recruitments-widget .omsar-recruitment-details .detail-value,
.omsar-bd-recruitments-widget .omsar-recruitment-apply-btn,
.omsar-bd-recruitments-widget .omsar-recruitment-load-more-btn,
.omsar-bd-recruitments-widget .omsar-recruitment-empty-message {
    font-family: var(--font-main, 'Inter', sans-serif) !important;
}

.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-filter-label,
.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-status-tab,
.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-title,
.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-badge,
.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-entity,
.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-dates,
.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-details .detail-value,
.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-apply-btn,
.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-load-more-btn,
.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-empty-message,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-filter-label,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-status-tab,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-title,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-badge,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-entity,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-dates,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-details .detail-value,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-apply-btn,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-load-more-btn,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-empty-message,
.rtl-card .omsar-recruitment-title,
.rtl-card .omsar-recruitment-badge,
.rtl-card .omsar-recruitment-entity,
.rtl-card .omsar-recruitment-dates,
.rtl-card .omsar-recruitment-details .detail-value,
.rtl-card .omsar-recruitment-apply-btn {
    font-family: 'Almarai', sans-serif !important;
}

/* Recruitments Filter Tabs (Open, Upcoming, Closed — style only) */
.omsar-recruitments-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    align-items: center;
}

.omsar-recruitment-filter-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    margin: 0;
}

.omsar-recruitment-status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.omsar-recruitment-status-tab {
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    background-image: none !important;
}

.omsar-recruitments-grid.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.omsar-recruitments-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7db3e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 767.98px) {
    .omsar-recruitments-filters {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .omsar-recruitment-filter-label {
        font-size: 13px;
        width: 100%;
    }
    
    .omsar-recruitment-status-tabs {
        gap: 8px;
    }
    
    .omsar-recruitment-status-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
}

.omsar-recruitments-grid {
    display: grid;
    gap: 24px;
    width: 100%;
}

.omsar-recruitment-item {
    width: 100%;
}

/* Empty state styling - spans full width and centers content */
.omsar-recruitment-empty-state {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* padding: 60px 20px; */
    text-align: center;
}

.omsar-recruitment-empty-message {
    margin: 0;
    text-align: center;
    max-width: 800px;
}

.omsar-recruitment-card {
    position: relative;
    border: none;
    border-radius: 12px;
    padding: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.omsar-recruitment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.omsar-recruitment-card.has-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    z-index: 1;
    pointer-events: none;
}

.omsar-recruitment-card.has-overlay .omsar-recruitment-content {
    position: relative;
    z-index: 2;
}

.omsar-recruitment-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Content */
.omsar-recruitment-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.omsar-recruitment-title {
    line-height: 1.3;
    margin-bottom: 12px;
    margin-top: 0;
    letter-spacing: -0.02em;
}

/* Header (Title + Status badge aligned on same row) */
.omsar-recruitment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    /* margin-bottom: 12px; */
}

.omsar-recruitment-header .omsar-recruitment-title {
    margin-bottom: 0;
    flex: 1 1 auto;
}

.omsar-recruitment-header .omsar-recruitment-badge {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Badge */
.omsar-recruitment-badge {
    display: inline-block;
    padding: 2px 10px;
    text-transform: none;
    letter-spacing: 0;
    width: fit-content;
}

/* RTL / Arabic — widget + card layout */
.omsar-bd-recruitments-widget[dir="rtl"],
.omsar-bd-recruitments-widget.omsar-bd-rtl {
    direction: rtl;
}

.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitments-filters,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitments-filters {
    direction: rtl;
}

.rtl-card .omsar-recruitment-content {
    text-align: right;
}

.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-header,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-header,
.rtl-card .omsar-recruitment-header {
    justify-content: space-between;
    gap: 12px;
}

.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-header .omsar-recruitment-title,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-header .omsar-recruitment-title,
.rtl-card .omsar-recruitment-header .omsar-recruitment-title {
    flex: 1 1 auto;
    text-align: right;
}

.omsar-bd-recruitments-widget[dir="rtl"] .omsar-recruitment-header .omsar-recruitment-badge,
.omsar-bd-recruitments-widget.omsar-bd-rtl .omsar-recruitment-header .omsar-recruitment-badge,
.rtl-card .omsar-recruitment-header .omsar-recruitment-badge {
    flex: 0 0 auto;
    align-self: flex-start;
    margin-right: 0;
    margin-left: 0;
    order: 0;
}

.rtl-card .omsar-recruitment-badge {
    margin-right: 0;
}

/* Details */
.omsar-recruitment-details {
    margin-top: 10px;
    margin-bottom: 10px;
}
.omsar-recruitment-details p {
    margin: 0;
}

.omsar-recruitment-entity,
.omsar-recruitment-dates {
    line-height: 1.8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.omsar-recruitment-dates {
    margin-bottom: 0;
}

.omsar-recruitment-details .detail-value {
    font-weight: 500;
    font-size: inherit;
}

.omsar-recruitment-details i {
    min-width: 16px;
}

/* RTL/Arabic: entity and date aligned right; icon on the right, text on the left */
/* .rtl-card .omsar-recruitment-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
} */

.rtl-card .omsar-recruitment-entity,
.rtl-card .omsar-recruitment-dates {
    flex-direction: row;
    justify-content: flex-start;
    direction: rtl;
    text-align: right;
}

.rtl-card .omsar-recruitment-details .detail-value {
    text-align: right;
}

/* Actions */
.omsar-recruitment-actions {
    padding-top: 0;
    border-top: none;
    margin-top: auto;
    align-self: flex-start;
}

.rtl-card .omsar-recruitment-actions {
    align-self: flex-start;
}

.omsar-recruitment-apply-btn {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.omsar-recruitment-apply-btn:hover {
    background-color: #f5f5f5;
    color: #000000;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.omsar-recruitment-apply-btn:active {
    transform: translateY(0);
}

/* Recruitments Load More */
.omsar-recruitment-load-more-wrapper {
    text-align: center;
    margin-top: 24px;
    margin-bottom: 16px;
}

.omsar-recruitment-load-more-btn {
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.omsar-recruitment-load-more-btn:hover:not(:disabled) {
    text-decoration: none;
}

.omsar-recruitment-load-more-btn.loading,
.omsar-recruitment-load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .omsar-recruitment-card {
        padding: 28px;
    }

    .omsar-recruitment-title {
        font-size: 1.5rem;
    }

    .omsar-recruitment-apply-btn {
        padding: 10px 28px;
        font-size: 0.9rem;
    }
}

@media (max-width: 767.98px) {
    .omsar-recruitments-grid {
        grid-template-columns: 1fr !important;
    }

    .omsar-recruitment-card {
        padding: 24px;
    }

    .omsar-recruitment-title {
        font-size: 1.375rem;
        margin-bottom: 10px;
    }

    .omsar-recruitment-badge {
        padding: 5px 14px;
        font-size: 0.7rem;
        margin-bottom: 16px;
    }

    .omsar-recruitment-entity,
    .omsar-recruitment-dates {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .omsar-recruitment-details .detail-value {
        font-size: inherit;
    }

    .omsar-recruitment-details i {
        font-size: 13px;
    }

    .omsar-recruitment-apply-btn {
        padding: 10px 24px;
        font-size: 0.875rem;
    }
}

@media (max-width: 575.98px) {
    .omsar-recruitment-card {
        padding: 20px;
    }

    .omsar-recruitment-title {
        font-size: 1.25rem;
        margin-bottom: 8px;
    }

    .omsar-recruitment-badge {
        padding: 4px 12px;
        font-size: 0.65rem;
        margin-bottom: 14px;
    }

    .omsar-recruitment-entity,
    .omsar-recruitment-dates {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .omsar-recruitment-details .detail-value {
        font-size: inherit;
    }

    .omsar-recruitment-details i {
        font-size: 13px;
    }

    .omsar-recruitment-apply-btn {
        padding: 10px 20px;
        font-size: 0.8125rem;
    }
}
