/**
 * Frontend CSS for LH2 Google SSO
 */

/* SSO Button Container - Top Right on Desktop */
#lh2-google-sso-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: none; /* Hidden by default, shown via media query */
}

/* Show on desktop only */
@media screen and (min-width: 768px) {
    #lh2-google-sso-button {
        display: block;
    }
}

/* Hide on mobile */
@media screen and (max-width: 767px) {
    #lh2-google-sso-button {
        display: none !important;
    }
}

/* SSO Button Styling */
.lh2-google-sso-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.lh2-google-sso-trigger:hover {
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
    background: #f8f9fa;
}

.lh2-google-sso-trigger:active {
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    background: #f1f3f4;
}

.lh2-google-sso-trigger svg {
    flex-shrink: 0;
}

.lh2-google-sso-trigger span {
    white-space: nowrap;
}

/* Ensure button doesn't interfere with other elements */
#lh2-google-sso-button * {
    box-sizing: border-box;
}

/* ========================================
   Sticky Bottom Bar Styles
   ======================================== */

.lh2-sso-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    padding: 16px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-sizing: border-box;
    
    /* Light mode (default) */
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    color: #333333;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .lh2-sso-sticky-bar {
        background-color: #1a1a1a;
        border-top: 1px solid #333333;
        color: #f0f0f0;
    }
    
    .lh2-sso-sticky-bar__close {
        color: #999999;
    }
    
    .lh2-sso-sticky-bar__close:hover {
        color: #ffffff;
        background-color: rgba(255, 255, 255, 0.1);
    }
}

.lh2-sso-sticky-bar__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.lh2-sso-sticky-bar__text {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
}

.lh2-sso-sticky-bar__text a {
    color: inherit;
    text-decoration: underline;
}

.lh2-sso-sticky-bar__text a:hover {
    opacity: 0.8;
}

.lh2-sso-sticky-bar__button {
    flex-shrink: 0;
}

.lh2-sso-sticky-bar__close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    
    /* Light mode */
    color: #666666;
}

.lh2-sso-sticky-bar__close:hover {
    color: #333333;
    background-color: rgba(0, 0, 0, 0.05);
}

.lh2-sso-sticky-bar__close:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

/* Hide animation */
.lh2-sso-sticky-bar.lh2-sso-sticky-bar--hiding {
    transform: translateY(100%);
    opacity: 0;
}

/* Mobile styles - stacked layout */
@media screen and (max-width: 767px) {
    .lh2-sso-sticky-bar {
        padding: 14px 50px 14px 16px;
    }
    
    .lh2-sso-sticky-bar__content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .lh2-sso-sticky-bar__text {
        font-size: 14px;
        text-align: left;
    }
    
    .lh2-sso-sticky-bar__button {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .lh2-sso-sticky-bar__close {
        top: 10px;
        right: 8px;
        transform: none;
        font-size: 24px;
    }
}

/* Desktop - ensure close button doesn't overlap content */
@media screen and (min-width: 768px) {
    .lh2-sso-sticky-bar {
        padding-right: 60px;
    }
}

