/**
 * Admin Section Styles
 * Styles specific to admin dashboard and management pages
 */

/* Admin Navigation */
.admin-nav {
    background-color: #5d2650;
    box-shadow: 0 2px 4px rgba(93, 38, 80, 0.3);
}

.admin-nav .navbar-brand {
    color: #fff !important;
}

.admin-nav .navbar-brand:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

.admin-nav .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    transition: color 0.2s ease;
}

.admin-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.95) !important;
}

.admin-nav .nav-link.active {
    color: #fff !important;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 0.375rem;
}

/* Admin Nav Dropdown */
.admin-nav .dropdown-toggle::after {
    display: none;
}

.admin-nav .dropdown-toggle.active,
.admin-nav .dropdown-toggle:focus {
    color: #fff !important;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 0.375rem;
}

.admin-nav .dropdown-menu-dark {
    background-color: #4a1f40;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.admin-nav .dropdown-menu-dark .dropdown-item {
    color: rgba(255, 255, 255, 0.75);
}

.admin-nav .dropdown-menu-dark .dropdown-item:hover,
.admin-nav .dropdown-menu-dark .dropdown-item:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-nav .dropdown-menu-dark .dropdown-item.active {
    color: #fff;
    background-color: #007c89;
}

.admin-nav .dropdown-menu-dark .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.15);
}

.admin-nav .btn-outline-light {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.admin-nav .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: #fff !important;
}

/* Dashboard Cards */
.admin-dashboard-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: 1px solid #dee2e6;
}

.admin-dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-dashboard-card .card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Drag and Drop Zones */
.drag-zone {
    min-height: 200px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.drag-zone.drag-over {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}

.drag-zone.foursome-full {
    border-color: #198754;
    background-color: #d1e7dd;
}

.drag-zone.foursome-full .drop-message {
    color: #198754;
}

/* Participant Cards */
.participant-card {
    cursor: move;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
    background-color: #fff;
    margin-bottom: 0.5rem;
}

.participant-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.participant-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.participant-card .drag-handle {
    cursor: grab;
    color: #6c757d;
}

.participant-card .drag-handle:active {
    cursor: grabbing;
}

/* Foursome Cards */
.foursome-card {
    border: 2px solid #0d6efd;
    background-color: #fff;
}

.foursome-card.complete {
    border-color: #198754;
}

.foursome-card .foursome-header {
    background-color: #0d6efd;
    color: #fff;
    padding: 0.75rem;
    border-radius: 6px 6px 0 0;
}

.foursome-card.complete .foursome-header {
    background-color: #198754;
}

/* Slot Allocation Slider */
.slot-slider-container {
    padding: 2rem 1rem;
}

.slot-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #198754 0%, #198754 50%, #0dcaf0 50%, #0dcaf0 100%);
    outline: none;
    -webkit-appearance: none;
}

.slot-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slot-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: none;
}

.slot-slider::-webkit-slider-thumb:hover {
    background: #0b5ed7;
    transform: scale(1.1);
}

.slot-slider::-moz-range-thumb:hover {
    background: #0b5ed7;
    transform: scale(1.1);
}

.slot-value-display {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.slot-value-employee {
    color: #198754;
}

.slot-value-sponsor {
    color: #0dcaf0;
}

/* Registration Editor Modal */
.registration-editor-modal .read-only-field {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.registration-editor-modal .editable-field {
    border-left: 3px solid #0d6efd;
}

.registration-editor-modal .field-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Action Buttons */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-edit {
    color: #0d6efd;
    border-color: #0d6efd;
}

.btn-edit:hover {
    background-color: #0d6efd;
    color: #fff;
}

.btn-delete {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-delete:hover {
    background-color: #dc3545;
    color: #fff;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .admin-dashboard-card {
        margin-bottom: 1rem;
    }

    .participant-card {
        font-size: 0.875rem;
    }

    .foursome-card {
        margin-bottom: 1rem;
    }

    .slot-slider-container {
        padding: 1rem 0.5rem;
    }
}

/* Accessibility */
.drag-zone:focus-within {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.participant-card:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

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

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

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

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

/* Foursome Grid Layout */
.foursome-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Desktop: 6 columns */
@media (min-width: 1200px) {
    .foursome-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Tablet: 4 columns */
@media (min-width: 768px) and (max-width: 1199px) {
    .foursome-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile: 2 columns */
@media (max-width: 767px) {
    .foursome-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Foursome Slot Styles */
.foursome-slot {
    min-height: 200px;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    background-color: #fff;
    transition: all 0.2s ease;
}

.foursome-slot.empty {
    background-color: #f8f9fa;
}

.foursome-slot.partial {
    background-color: #fff3cd;
    border-color: #ffc107;
}

.foursome-slot.full {
    background-color: #d4edda;
    border-color: #28a745;
}

.foursome-slot .slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.foursome-slot .slot-number {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
}

.foursome-slot .slot-count {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.foursome-slot.full .slot-count {
    background-color: #28a745;
    color: #fff;
}

.foursome-slot.partial .slot-count {
    background-color: #ffc107;
    color: #000;
}

.foursome-slot .slot-body {
    min-height: 120px;
}

.foursome-slot .empty-slot-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: #6c757d;
    font-size: 0.875rem;
    text-align: center;
}

/* Player Card Styles */
.player-card {
    cursor: grab;
    transition: all 0.2s ease;
    opacity: 1;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
}

.player-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.player-card:active {
    cursor: grabbing;
}

.player-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.player-card .card-body {
    padding: 0;
}

.player-card .player-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: #212529;
}

.player-card .player-email {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.player-card .player-meta {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.player-card .player-meta .badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
}

.player-card .player-indicators {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.player-card .player-indicators i {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Drop Zone States */
[data-drop-zone] {
    transition: all 0.2s ease;
}

[data-drop-zone].drag-over-valid {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

[data-drop-zone].drag-over-invalid {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    cursor: not-allowed;
}

/* Keyboard Focus States */
.player-card:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.keyboard-drag-mode [data-drop-zone] {
    border: 2px solid #6c757d;
}

.keyboard-drag-mode [data-drop-zone].focused {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

/* Mobile Responsive Adjustments */
@media (max-width: 767px) {
    .foursome-slot {
        min-height: 150px;
        padding: 0.5rem;
    }
    
    .player-card {
        font-size: 0.75rem;
    }
    
    .player-card .player-name {
        font-size: 0.75rem;
    }
    
    .player-card .player-email {
        font-size: 0.625rem;
    }
}
