/* ConnectWith9 Job Portal Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 400px;
}

.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-5px);
}

.card {
    border-radius: 10px;
    overflow: hidden;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn {
    border-radius: 5px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.job-description {
    line-height: 1.8;
    white-space: pre-wrap;
}

.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
}

footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

/* Button Loader Spinner */
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

.btn:disabled {
    pointer-events: none;
}

footer a:hover {
    opacity: 0.8;
}

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

.card {
    animation: fadeIn 0.5s ease;
}

/* Light theme (default) */
[data-bs-theme="light"] {
    --bs-body-bg: #ffffff;
    --bs-body-color: #212529;
}

/* Dark theme overrides */
[data-bs-theme="dark"] {
    --bs-body-bg: #121212;
    --bs-body-color: #e0e0e0;
}

[data-bs-theme="dark"] body {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .bg-primary {
    background-color: #000 !important;
}

[data-bs-theme="dark"] .navbar {
    background-color: #000 !important;
    border-bottom: 1px solid #333;
}

[data-bs-theme="dark"] .card {
    background-color: #1e1e1e !important;
    border: 1px solid #333 !important;
}

[data-bs-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2b3035 !important;
}

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

[data-bs-theme="dark"] .card {
    background-color: #1e1e1e;
    border-color: #333;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #1e1e1e;
    border-color: #333;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .table {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .table thead {
    background-color: #2c2c2c;
}

[data-bs-theme="dark"] .navbar-brand,
[data-bs-theme="dark"] .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1e1e1e;
    border-color: #333;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #2c2c2c;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: #1e1e1e;
    border-color: #333;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .list-group-item-action:hover {
    background-color: #2c2c2c;
}

[data-bs-theme="dark"] .list-group-item.bg-light {
    background-color: #252525 !important;
}

/* Responsive */
@media (max-width: 768px) {

/* Form styles */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Alert messages */
.alert {
    border-radius: 8px;
    border: none;
}

/* Table styles */
.table-responsive {
    border-radius: 8px;
}

.table thead {
    background-color: #f8f9fa;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Sticky top adjustment */
.sticky-top {
    z-index: 1020;
}

/* Navbar dropdown z-index fix */
.navbar .dropdown-menu {
    z-index: 9999;
}

.navbar .dropdown {
    position: relative;
}

/* Ensure dropdowns appear above all content */
.dropdown-menu.show {
    z-index: 9999 !important;
}

/* Fix for notification and profile dropdowns - HIGHEST z-index */
.notification-dropdown,
#userDropdown + .dropdown-menu {
    z-index: 2147483647 !important;
}

/* Fix notification dropdown parent to have high stacking context */
.navbar .dropdown {
    z-index: 2147483647;
}

.navbar .dropdown-menu.show {
    z-index: 2147483647 !important;
    position: absolute !important;
}

/* Ensure navbar has high stacking context */
.navbar {
    z-index: 2147483646 !important;
}

/* All page content should be below navbar dropdowns */
main, .container, .card, .sticky-top {
    z-index: auto !important;
}

/* Force notification dropdown to appear above everything including sticky cards */
.notification-dropdown {
    position: fixed !important;
    min-width: 280px;
    top: auto !important;
    left: auto !important;
    right: auto !important;
}
