/* Protostar Hub - Component Styles */

/* ========================================
   Reusable Components
   ======================================== */

/* Card Component */
.ps-card {
    border: 1px solid var(--border-subtle);
    background: var(--bg-panel-alt);
    border-radius: var(--radius-s);
    padding: 16px;
}

.ps-card--raised {
    border-color: var(--border-strong);
    background: var(--bg-panel-alt);
    box-shadow: var(--shadow);
}

.ps-card--accent {
    border-color: var(--accent-strong);
}

/* Hero Component */
.hero-section {
    padding: 60px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-section h1 {
    font-family: var(--font-brand), 'Oxanium', monospace;
    font-weight: var(--weight-bold);
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: var(--spacing-heading);
    text-transform: uppercase;
}

.hero-section p {
    font-family: var(--font-ui), 'Tektur', sans-serif;
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

/* Stats Panel Component */
.stats-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stats-item {
    text-align: center;
    background: var(--bg-subtle);
    padding: 16px;
    border-radius: var(--radius-s);
}

.stats-value {
    font-family: var(--font-data), 'Tektur', monospace;
    font-size: 24px;
    font-weight: var(--weight-bold);
    color: var(--accent-primary);
}

.stats-label {
    font-family: var(--font-ui), 'Tektur', sans-serif;
    text-transform: uppercase;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Activity Grid Component */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.activity-column h4 {
    font-family: var(--font-brand), 'Oxanium', monospace;
    color: var(--accent-primary);
    margin: 0 0 12px 0;
    font-size: 12px;
}

.activity-item {
    padding: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.activity-date {
    font-family: var(--font-data), 'Tektur', monospace;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.activity-title {
    font-family: var(--font-data), 'Tektur', monospace;
    font-weight: var(--weight-medium);
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.3;
}

/* Timeline Component */
.timeline {
    padding: 16px 0;
}

.timeline-item {
    display: flex;
    margin-bottom: 24px;
}

.timeline-marker {
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    vertical-align: top;
}

.timeline-title {
    font-family: var(--font-brand), 'Oxanium', monospace;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.timeline-description {
    font-family: var(--font-data), 'Tektur', monospace;
    color: var(--text-secondary);
    margin: 0;
}

/* Footer Component */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 48px 0 24px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
    margin-bottom: 32px;
}

.footer-section h4 {
    font-family: var(--font-heading), 'Oxanium', monospace;
    font-weight: var(--weight-semibold);
    letter-spacing: var(--spacing-heading);
    text-transform: uppercase;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* 404 Error Page */
.error-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.error-code {
    font-family: var(--font-brand), 'Oxanium', monospace;
    font-size: 4rem;
    font-weight: var(--weight-bold);
    color: var(--accent-warning);
    margin-bottom: 16px;
}

.error-message {
    font-family: var(--font-ui), 'Tektur', sans-serif;
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 600px;
}

.error-actions {
    margin-top: 24px;
}

/* Loading Component */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-family: var(--font-ui), 'Tektur', sans-serif;
    color: var(--text-secondary);
}

/* Search Component */
.search-form {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.search-input input {
    width: 100%;
}

.search-button {
    white-space: nowrap;
}

/* Skip Navigation Link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: absolute;
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    padding: 8px 16px;
    background: var(--bg-panel-alt);
    color: var(--text-primary);
    text-decoration: none;
    z-index: 9999;
    border-radius: var(--radius-s);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--bg-button);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 100;
    box-shadow: var(--shadow);
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    background: var(--bg-button-hover);
    transform: translateY(-4px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--bg-panel-alt);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-s);
    padding: 12px 16px;
    box-shadow: var(--shadow);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast--info {
    border-color: var(--accent-strong);
}

.toast--success {
    border-color: var(--success);
}

.toast--error {
    border-color: var(--danger);
}

.toast--warning {
    border-color: var(--warning);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .activity-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-marker {
        margin-right: 0;
        margin-bottom: 12px;
    }
}
