/**
 * Ayten Authentication UI Styles
 */

/* ============================================
   Navbar Auth Components
   ============================================ */

.auth-container {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 24px;
}

/* Sign In Button */
.auth-signin-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #1976D2;
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s;
    font-family: 'Roboto', sans-serif;
}

.auth-signin-btn:hover {
    background: #1565C0;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.auth-signin-btn .material-icons {
    font-size: 20px;
}

/* User Dropdown */
.auth-user-dropdown {
    position: relative;
}

.auth-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 24px;
    cursor: pointer;
    transition: box-shadow 0.3s, border-color 0.3s;
    font-family: 'Roboto', sans-serif;
}

.auth-user-btn:hover {
    border-color: #1976D2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.auth-avatar-icon {
    font-size: 32px;
    color: #757575;
}

.auth-username {
    font-size: 14px;
    font-weight: 500;
    color: #212121;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-dropdown-icon {
    font-size: 24px;
    color: #757575;
    transition: transform 0.3s;
}

.auth-user-btn:hover .auth-dropdown-icon {
    color: #1976D2;
}

/* Dropdown Menu */
.auth-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    z-index: 1000;
    overflow: hidden;
}

.auth-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.auth-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #212121;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'Roboto', sans-serif;
}

.auth-dropdown-item:hover {
    background: #F5F5F5;
}

.auth-dropdown-item .material-icons {
    font-size: 20px;
    color: #757575;
}

.auth-dropdown-divider {
    height: 1px;
    background: #E0E0E0;
    margin: 8px 0;
}

/* ============================================
   Auth Gate Overlay
   ============================================ */

.auth-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.auth-gate-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-gate-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    border-radius: 50%;
    margin-bottom: 24px;
}

.auth-gate-icon .material-icons {
    font-size: 40px;
    color: white;
}

.auth-gate-title {
    font-size: 28px;
    font-weight: 500;
    color: #212121;
    margin-bottom: 12px;
}

.auth-gate-message {
    font-size: 16px;
    color: #757575;
    margin-bottom: 32px;
}

.auth-gate-benefits {
    text-align: left;
    background: #F5F5F5;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.auth-gate-benefits h3 {
    font-size: 16px;
    font-weight: 500;
    color: #212121;
    margin-bottom: 16px;
}

.auth-gate-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-gate-benefits li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #424242;
}

.auth-gate-benefits li:last-child {
    margin-bottom: 0;
}

.auth-gate-benefits .material-icons {
    font-size: 20px;
    color: #4CAF50;
}

.auth-gate-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: #1976D2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    font-family: 'Roboto', sans-serif;
    margin-bottom: 12px;
}

.auth-gate-signin-btn:hover {
    background: #1565C0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.auth-gate-signin-btn .material-icons {
    font-size: 24px;
}

.auth-gate-cancel-btn {
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    color: #757575;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    font-family: 'Roboto', sans-serif;
}

.auth-gate-cancel-btn:hover {
    background: #F5F5F5;
    color: #424242;
}

/* ============================================
   Page-Specific Auth Gates
   ============================================ */

.auth-page-gate {
    max-width: 600px;
    margin: 48px auto;
    padding: 0 24px;
}

.auth-page-gate .card {
    text-align: center;
    padding: 48px 32px;
}

.auth-page-gate .auth-gate-icon {
    margin: 0 auto 24px;
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 768px) {
    .auth-container {
        margin-right: 12px;
    }

    .auth-signin-btn {
        padding: 9px 18px;
        font-size: 13px;
    }

    .auth-username {
        display: none; /* Hide username on tablets */
    }

    .auth-user-btn {
        padding: 6px;
    }

    .auth-dropdown-menu {
        right: 0;
        min-width: 200px;
    }

    .auth-dropdown-item {
        padding: 14px 16px;
        font-size: 15px;
    }

    /* Auth gate mobile */
    .auth-gate-card {
        padding: 28px 20px;
        max-width: 92%;
        width: 92%;
    }

    .auth-gate-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .auth-gate-icon .material-icons {
        font-size: 36px;
    }

    .auth-gate-title {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .auth-gate-message {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .auth-gate-benefits {
        padding: 20px;
        margin-bottom: 28px;
    }

    .auth-gate-benefits h3 {
        font-size: 15px;
        margin-bottom: 14px;
    }

    .auth-gate-benefits li {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .auth-gate-signin-btn {
        padding: 15px 24px;
        font-size: 15px;
        margin-bottom: 10px;
    }

    .auth-gate-cancel-btn {
        padding: 13px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        margin-right: 8px;
    }

    /* Hide text on very small screens, show icon only */
    .auth-signin-btn span:not(.material-icons) {
        display: none;
    }

    .auth-signin-btn {
        padding: 10px;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        justify-content: center;
        min-width: 44px; /* Touch-friendly */
    }

    .auth-signin-btn .material-icons {
        font-size: 22px;
    }

    /* Smaller auth gate */
    .auth-gate-card {
        padding: 24px 16px;
        max-width: 96%;
        width: 96%;
    }

    .auth-gate-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }

    .auth-gate-icon .material-icons {
        font-size: 32px;
    }

    .auth-gate-title {
        font-size: 22px;
    }

    .auth-gate-message {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .auth-gate-benefits {
        padding: 16px;
        margin-bottom: 24px;
    }

    .auth-gate-benefits h3 {
        font-size: 14px;
    }

    .auth-gate-benefits li {
        font-size: 12px;
    }

    .auth-gate-signin-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    .auth-gate-cancel-btn {
        padding: 12px 20px;
        font-size: 13px;
    }

    /* Dropdown adjustments */
    .auth-dropdown-menu {
        right: -12px;
        min-width: 180px;
    }

    .auth-dropdown-item {
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .auth-user-btn {
        min-height: 44px;
    }

    .auth-dropdown-item {
        min-height: 48px;
        padding: 12px 16px;
    }

    .auth-gate-signin-btn,
    .auth-gate-cancel-btn {
        min-height: 50px;
    }
}
