/**
 * GSA Private Access Sizing Planner - Shared Component Styles
 * 
 * Contains all shared styles for header, navigation, footer, and version badge
 * to prevent duplication across HTML pages.
 */

/* ============================================
   Header Styles
   ============================================ */

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* GitHub Link */
.github-link {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.2s, transform 0.2s;
    text-decoration: none;
}

.github-link:hover {
    color: white;
    transform: scale(1.1);
}

/* Version Badge in Header */
.version-badge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.version-badge-header {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.2s;
    cursor: help;
    position: relative;
}

.version-badge-header:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.update-text {
    color: #84B135;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.update-text:hover {
    text-decoration: underline;
}

/* Optional update indicator dot (for future use) */
.update-dot {
    width: 8px;
    height: 8px;
    background: #84B135;
    border-radius: 50%;
    margin-left: 6px;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

/* ============================================
   Update Modal
   ============================================ */

.update-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

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

.update-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

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

.update-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.update-modal-header h2 {
    margin: 0;
    color: #0078d4;
    font-size: 1.5rem;
}

.update-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.update-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.update-modal-body {
    padding: 24px;
}

.version-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.version-box {
    text-align: center;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 8px;
    min-width: 100px;
}

.version-box-new {
    background: #e8f5e9;
    border: 2px solid #84B135;
}

.version-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.version-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.version-box-new .version-number {
    color: #84B135;
}

.update-message {
    background: #f0f6fc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.update-message p {
    margin: 0 0 8px 0;
    color: #333;
}

.update-message p:last-child {
    margin-bottom: 0;
}

.release-date {
    font-size: 0.9rem;
    color: #666;
}

.update-actions {
    text-align: center;
}

.btn-update {
    display: inline-block;
    background: #0078d4;
    color: white;
    padding: 12px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-update:hover {
    background: #005a9e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.update-note {
    text-align: center;
    padding: 16px;
    background: #fff4ce;
    border-radius: 8px;
    border-left: 4px solid #ffb900;
}

.update-note p {
    margin: 0;
    color: #333;
}

/* ============================================
   Navigation Tabs
   ============================================ */

.nav-tabs {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-tabs-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 5px;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.nav-tab:hover {
    color: #0078d4;
    background: rgba(0, 120, 212, 0.05);
}

.nav-tab.active {
    color: #0078d4;
    border-bottom-color: #0078d4;
    background: #f8fafc;
}

.nav-tab svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ============================================
   Footer
   ============================================ */

footer {
    background: #f8f8f8;
    padding: 30px 20px;
    text-align: center;
    margin-top: 60px;
    border-top: 1px solid #e0e0e0;
}

footer p {
    margin: 0;
    color: #666;
}

/* ============================================
   Dark Mode Support
   ============================================ */

[data-theme="dark"] .nav-tabs {
    background: #1e1e1e;
    border-bottom-color: #444;
}

[data-theme="dark"] .nav-tab {
    color: #b0b0b0;
}

[data-theme="dark"] .nav-tab:hover {
    color: #0078d4;
    background: rgba(0, 120, 212, 0.15);
}

[data-theme="dark"] .nav-tab.active {
    color: #0078d4;
    background: #2a2a2a;
}

[data-theme="dark"] footer {
    background: #1e1e1e;
    border-top-color: #444;
}

[data-theme="dark"] footer p {
    color: #b0b0b0;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .header-content {
        padding: 15px;
    }
    
    .version-badge-header {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
    
    .nav-tabs {
        padding: 0 10px;
    }
    
    .nav-tabs-inner {
        gap: 0;
    }
    
    .nav-tab {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .nav-tab svg {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   Skip Navigation Link (A06)
   ============================================ */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0078d4;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10000;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    transition: top 0.1s;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-tab {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}
