/**
 * Coloring Print - Header User Section Styles
 * Credits display, user dropdown, check-in button
 */

/* User Section */
.header-user-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logged-in-state {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Credits Display */
.credits-menu-wrapper {
    position: relative;
}

.credits-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(253, 145, 105, 0.1);
    border: 1px solid rgba(253, 145, 105, 0.3);
    border-radius: 20px;
    color: #FD9169;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.credits-display:hover {
    background: rgba(253, 145, 105, 0.2);
    border-color: #FD9169;
}

/* Check-in Button */
.checkin-wrapper {
    position: relative;
}

.checkin-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(52, 168, 83, 0.1);
    border: 1px solid rgba(52, 168, 83, 0.3);
    color: #34a853;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkin-btn:hover:not(:disabled) {
    background: #34a853;
    color: #fff;
    border-color: #34a853;
}

.checkin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkin-btn.checked {
    background: rgba(52, 168, 83, 0.2);
    border-color: #34a853;
    color: #34a853;
}

/* Check-in Tooltip */
.checkin-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    padding: 12px 14px;
    background: rgba(15, 15, 30, 0.98);
    border: 1px solid rgba(253, 145, 105, 0.3);
    border-radius: 10px;
    color: #9ca3af;
    font-size: 0.8rem;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.checkin-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 10px;
    height: 10px;
    background: rgba(15, 15, 30, 0.98);
    border-left: 1px solid rgba(253, 145, 105, 0.3);
    border-top: 1px solid rgba(253, 145, 105, 0.3);
    transform: rotate(45deg);
}

.checkin-wrapper:hover .checkin-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* User Dropdown Menu */
.credits-menu-wrapper .user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 220px;
    background: rgba(15, 15, 30, 0.98);
    border: 1px solid rgba(253, 145, 105, 0.2);
    border-radius: 12px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px 16px;
}

.user-email {
    font-size: 13px;
    color: #9ca3af;
    word-break: break-all;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.2s ease;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(253, 145, 105, 0.1);
    color: #fff;
}

.logout-btn {
    color: #ef4444;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Check-in Toast */
.checkin-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #34a853, #2d9348);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(52, 168, 83, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10001;
}

.checkin-toast.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 15px;
    white-space: nowrap;
}

/* Mobile User Section */
.mobile-user-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    padding-top: 12px;
}

.mobile-user-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 0 12px;
}

.mobile-credits {
    padding: 8px 16px;
}

.mobile-logout-btn {
    background: none;
    border: none;
}

/* Mobile Responsive */
@media screen and (max-width: 767px) {
    .checkin-tooltip {
        display: none;
    }
}
