/* ============================================
   WLM Admin Panel - Custom Styles
   ============================================ */

/* General Admin Styles */
.admin-container {
    padding: 2rem;
    background-color: #f8f9fa;
    min-height: 100vh;
}

.admin-header {
    background: #0d6efd; /* Bootstrap blue */
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    -webkit-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-header h2 {
    margin: 0;
    font-weight: 600;
}

.admin-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

/* Tab Styling */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: none;
    border-bottom: 3px solid transparent;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: #495057;
    border-bottom-color: #dee2e6;
}

.nav-tabs .nav-link.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background-color: transparent;
}

/* Card Sections */
.admin-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.admin-card-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f3f5;
}

.admin-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

/* Collapsible Form Section */
.collapsible-section {
    margin-bottom: 2rem;
    max-width: 900px;
    margin: 0 auto 2rem auto;

}

.collapsible-toggle {
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    background: white;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    font-weight: 500;
    color: #495057;
}

.collapsible-toggle:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
    color: #667eea;
}

.collapsible-toggle.active {
    border-style: solid;
    border-color: #667eea;
    background-color: #f8f9ff;
    color: #667eea;
}

.collapsible-toggle i {
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
    transition: transform 0.3s ease, -webkit-transform 0.3s ease;
}

.collapsible-toggle.active i {
    -webkit-transform: rotate(180deg);
            transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    -webkit-transition: max-height 0.3s ease;
    transition: max-height 0.3s ease;
}

.collapsible-content.show {
    max-height: 1000px;
    margin-top: 1rem;
}

/* Form Styling */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: #667eea;
    -webkit-box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Tag Selection (Employee Exclusions) */
.tag-container {
    min-height: 60px;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 0.5rem;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
}

.tag-container.empty {
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    color: #6c757d;
    font-style: italic;
}

.employee-tag {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #0d6efd; /* Solid blue instead of gradient */
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    -webkit-animation: tagAppear 0.3s ease;
            animation: tagAppear 0.3s ease;
}

@-webkit-keyframes tagAppear {
    from {
        opacity: 0;
        -webkit-transform: scale(0.8);
                transform: scale(0.8);
    }
    to {
        opacity: 1;
        -webkit-transform: scale(1);
                transform: scale(1);
    }
}

@keyframes tagAppear {
    from {
        opacity: 0;
        -webkit-transform: scale(0.8);
                transform: scale(0.8);
    }
    to {
        opacity: 1;
        -webkit-transform: scale(1);
                transform: scale(1);
    }
}

.employee-tag-remove {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    cursor: pointer;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

.employee-tag-remove:hover {
    background: rgba(255, 255, 255, 0.5);
    -webkit-transform: scale(1.1);
            transform: scale(1.1);
}

/* Autocomplete Dropdown */
.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    -webkit-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    -webkit-transition: background-color 0.2s ease;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f1f3f5;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f8f9ff;
}

.autocomplete-item-main {
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.25rem;
}

.autocomplete-item-details {
    font-size: 0.875rem;
    color: #6c757d;
}

.autocomplete-empty {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Table Styling */
.admin-table {
    width: 100%;
    margin-bottom: 0;
}

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

.admin-table th {
    font-weight: 600;
    color: #495057;
    padding: 1rem;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.admin-table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5;
}

.admin-table tbody tr {
    -webkit-transition: background-color 0.2s ease;
    transition: background-color 0.2s ease;
}

.admin-table tbody tr:hover {
    background-color: #f8f9ff;
}

/* Action Buttons */
.btn-action {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

.btn-primary {
    background: #0d6efd; /* Bootstrap blue */
    border: none;
}

.btn-primary:hover {
    background: #0d6efd; /* Bootstrap blue */
    -webkit-transform: translateY(-1px);
            transform: translateY(-1px);
    -webkit-box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
            box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-danger {
    background-color: #dc3545;
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
    -webkit-transform: translateY(-1px);
            transform: translateY(-1px);
    -webkit-box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
            box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-warning {
    background-color: #ffc107;
    border: none;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    color: #212529;
}

.btn-success {
    background-color: #28a745;
    border: none;
}

.btn-success:hover {
    background-color: #218838;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box input {
    padding-right: 2.5rem;
}

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    -webkit-transform: translateY(-50%);
            transform: translateY(-50%);
    color: #6c757d;
}

/* Badge Styling */
.badge-status {
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 0.5rem;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-container {
        padding: 1rem;
    }
    
    .admin-header {
        padding: 1.5rem;
    }
    
    .admin-table {
        font-size: 0.875rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .btn-action {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Loading States */
.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

.loading-overlay.loading::after {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

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

.fade-in {
    -webkit-animation: fadeIn 0.3s ease;
            animation: fadeIn 0.3s ease;
}

/* Scrollbar Styling */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Centered form cards for collapsible sections */
.form-card-centered {
    max-width: 900px;
    margin: 0 auto;
}

/* Form group styling */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

/* Consistent select styling */
.form-control,
.form-select {
    height: 48px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    -webkit-box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
            box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Button alignment */
.text-end {
    text-align: right;
}

/* Button spacing */
.btn.me-2 {
    margin-right: 0.5rem;
}
