/* ========================================
   ENHANCEMENT STYLES FOR SKILLSUSA SITE
   ======================================== */

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-left-color: #28a745;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.warning {
    border-left-color: #ffc107;
}

.toast.info {
    border-left-color: #17a2b8;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    color: #999;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #333;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Search Box */
.entries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    padding: 10px 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    min-width: 250px;
    transition: all 0.3s;
}

.search-box:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

/* Table Row Hover Effects */
.entries-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

.entries-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateX(3px);
    box-shadow: -3px 0 0 #0066cc;
}

.entries-table tbody tr.highlight {
    background-color: #fff3cd;
    animation: highlight 1s ease;
}

@keyframes highlight {
    0%, 100% { background-color: #fff3cd; }
    50% { background-color: #ffc107; }
}

/* Competition Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.available {
    background: #d4edda;
    color: #155724;
}

.status-badge.almost-full {
    background: #fff3cd;
    color: #856404;
}

.status-badge.full {
    background: #f8d7da;
    color: #721c24;
}

/* Success Animation Container */
.success-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    pointer-events: none;
}

.checkmark-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease-out;
}

.checkmark {
    color: white;
    font-size: 60px;
    animation: checkmarkPop 0.3s ease-out 0.2s both;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes checkmarkPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Confirmation Dialog */
.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    animation: fadeIn 0.2s;
}

.confirmation-dialog {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease-out;
}

.confirmation-dialog h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
}

.confirmation-dialog p {
    margin: 0 0 25px 0;
    color: #666;
    line-height: 1.5;
}

.confirmation-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.confirmation-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
}

.btn-confirm {
    background: #dc3545;
    color: white;
}

.btn-confirm:hover {
    background: #c82333;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Dark Mode Styles */
body.dark-mode { background: #121212; color: #E0E0E0; }
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .navbar { background: #1E1E1E; border-bottom-color: #444; }
    background: #2d2d2d;
    border-bottom-color: #444;
}

body.dark-mode .container { background: #1E1E1E; }
    background: #2d2d2d;
}

body.dark-mode .form-section select,
body.dark-mode .form-section input {
    background: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .entries-table {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .entries-table thead {
    background: #3a3a3a;
}

body.dark-mode .entries-table tbody tr:hover {
    background: #3a3a3a;
}

body.dark-mode .search-box {
    background: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0066cc;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s;
    z-index: 1000;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .entries-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
    }

    #toast-container {
        left: 10px;
        right: 10px;
    }

    .toast {
        min-width: auto;
    }

    .dark-mode-toggle {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}
