/* Global Styles for Jobaro - Using Bootstrap Components */

/* ===== Card Hover Effects ===== */
/* Uses --jobaro-hover-lift-card-lg from theme.css (default -5px). Set to 0 to disable. */
.job-card,
.company-card,
.people-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.job-card:hover,
.company-card:hover,
.people-card:hover {
    transform: translateY(var(--jobaro-hover-lift-card-lg, -5px));
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}

[data-bs-theme="dark"] .job-card:hover,
[data-bs-theme="dark"] .company-card:hover,
[data-bs-theme="dark"] .people-card:hover {
    box-shadow: 0 .5rem 1rem rgba(255,255,255,.1)!important;
}

/* ===== Badge Styles ===== */
.badge-custom {
    font-size: 0.85rem;
    padding: 0.35em 0.65em;
}

/* ===== Bootstrap Carousel Customization ===== */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 20px;
}

.carousel-indicators button {
    background-color: rgba(0, 0, 0, 0.5);
}

.carousel-indicators .active {
    background-color: #0a66c2;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        padding: 15px;
    }
}

/* ===== Dark Mode Styles ===== */
/* People Card Styles */
.people-card {
    border: 1px solid #e0e0e0;
}

.people-card .card-body {
    padding: 1.5rem;
}

/* People Card Dark Mode */
[data-bs-theme="dark"] .people-card {
    border-color: #495057 !important;
    background-color: #212529 !important;
}

[data-bs-theme="dark"] .people-card .card-body {
    background-color: #212529 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .people-card .card-title {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .people-card .card-title a {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .people-card .card-title a:hover {
    color: #0d6efd !important;
}

[data-bs-theme="dark"] .people-card .text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .people-card strong {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .people-card .card-text {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .people-card .badge {
    background-color: rgba(13, 110, 253, 0.2) !important;
    color: #6ea8fe !important;
}

/* Dark Mode - General Transitions */
/* Commented out as it was making theme change slower */
/* [data-bs-theme="dark"] * {
    transition: background-color 0.3s ease, color 0.3s ease;
} */

/* ===== Theme Toggle Button ===== */
#theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    z-index: 1000;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
}

/* ===== RTL Support ===== */
html[dir="rtl"] {
    text-align: right;
}

html[dir="rtl"] .navbar-nav {
    flex-direction: row-reverse;
}

html[dir="rtl"] .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

html[dir="rtl"] #theme-toggle {
    right: auto;
    left: 20px;
}

/* ===== Language Dropdown ===== */
.dropdown-item {
    cursor: pointer;
}

.notification-item {
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: var(--bs-gray-100);
}

[data-bs-theme="dark"] .notification-item:hover {
    background-color: var(--bs-gray-800);
}

.notification-item:last-child {
    border-bottom: none !important;
}

.select2-container {
    min-width: 0 !important;
    width: 100% !important;
}

.select2-selection {
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
}

/* Vertically center placeholder and selected text in Select2 */
.select2-selection--single .select2-selection__rendered {
    display: flex !important;
    align-items: center !important;
    line-height: 1 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    width: 100%;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    display: flex !important;
    align-items: center !important;
    line-height: 1 !important;
    min-height: 38px !important;
}

[data-bs-theme="dark"] .select2-dropdown {
    background-color: #212529 !important;
    color: #fff !important;
}

/* Mobile: ensure Select2 dropdown is above offcanvas */
@media (max-width: 991px) {
    .select2-dropdown {
        z-index: 1045 !important;
    }
    /* When using native overlay for keyboard, hide Select2’s built-in search */
    #select2-mobile-search-overlay {
        z-index: 1100 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    #select2-mobile-search-overlay input,
    #select2-mobile-search-overlay .form-control {
        display: block !important;
        width: 100% !important;
        min-height: 44px !important;
        font-size: 16px !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    /* Built-in search always visible on mobile so user can type */
    .select2-container--open .select2-search {
        display: block !important;
        height: auto !important;
        min-height: 44px !important;
        overflow: visible !important;
        opacity: 1 !important;
        position: relative !important;
        left: 0 !important;
        pointer-events: auto !important;
        padding: 8px !important;
    }
    .select2-container--open .select2-search__field {
        display: block !important;
        width: 100% !important;
        min-height: 44px !important;
        font-size: 16px !important;
        padding: 10px 12px !important;
        box-sizing: border-box !important;
    }
}

.dropdown-menu {
    z-index: 1030 !important;
}