/* MouseScoring - Shared CSS */
/* Common utility classes and components used across multiple pages */

/* Utility Classes */
.hidden {
    display: none;
}

.title-bar.relative {
    position: relative;
}

/* User Menu Component (used in home.html and profile.html) */
.user-menu {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-email {
    font-size: 0.85rem;
    color: #666;
    display: none;
}

@media (min-width: 640px) {
    .user-email {
        display: block;
    }
}

.logout-button {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #ffffff;
    color: #111;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.logout-button:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* Account Page Wrapper */
.account-page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Back Button Container */
.back-button-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

/* Button Component (used across admin, profile, and other pages) */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: inline-block;
    text-align: center;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #111;
    color: #fff;
}

.btn-primary:hover {
    background: #333;
}

.btn-secondary {
    background: #fff;
    color: #111;
    border: 2px solid #111;
}

.btn-secondary:hover {
    background: #f5f5f5;
}

.btn-danger {
    background-color: #d32f2f;
    color: white;
}

.btn-danger:hover {
    background-color: #c62828;
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Admin Page Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.admin-section {
    margin: 24px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.error {
    padding: 24px;
    background: #ffebee;
    border: 1px solid #ef5350;
    border-radius: 8px;
    color: #c62828;
    text-align: center;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.1rem;
    color: #666;
}

/* Toast notification animations */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Admin Burger Menu Styles */

/* Burger wrapper - positioned on left side of title bar */
.admin-burger-wrapper {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

/* Burger button - matches logout button aesthetic */
.admin-burger-btn {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #ffffff;
    color: #111;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-burger-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.admin-burger-btn:focus {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

/* Burger icon - three horizontal lines */
.burger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 14px;
}

.burger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: #111;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Burger icon animation - transform to X when active */
.burger-icon.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.burger-icon.active span:nth-child(2) {
    opacity: 0;
}

.burger-icon.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Dropdown menu container */
.admin-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 220px;
    max-width: 280px;
    z-index: 1000;
    animation: slideDown 0.2s ease-out;
}

/* Navigation list inside dropdown */
.admin-nav-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.admin-nav-list li {
    margin: 0;
    padding: 0;
}

/* Navigation links */
.admin-nav-link {
    display: block;
    padding: 10px 16px;
    color: #111;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s ease;
}

.admin-nav-link:hover,
.admin-nav-link:focus {
    background: #f5f5f5;
    outline: none;
}

.admin-nav-link:active {
    background: #e8e8e8;
}

/* Slide down animation for dropdown */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design for mobile */
@media (max-width: 640px) {
    .admin-dropdown {
        left: 12px;
        right: 12px;
        min-width: auto;
        max-width: none;
    }

    /* Ensure burger doesn't overlap with title on small screens */
    .title-bar h1 {
        padding-left: 40px;
        padding-right: 40px;
    }
}

/* Touch-friendly targets for mobile */
@media (max-width: 640px) {
    .admin-burger-btn {
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
    }

    .admin-nav-link {
        padding: 14px 16px;
        font-size: 1rem;
    }
}