/*
 * Refsheet.net Sundown Service — Override Styles
 *
 * Base styles come from vendor/refsheet-legacy.css (the compiled production
 * bundle pulled from live refsheet.net, containing Materialize 1.0 + all
 * custom SASS). This file only contains additions for the sundown LiveView
 * app that don't exist in the legacy bundle.
 */

/* ========================================
   Layout Shell
   The legacy site uses #appRoot; our LiveView
   layout uses #rootApp as the flex container.
   ======================================== */

#rootApp {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* Push footer to bottom when content is short */
#rootApp>footer.page-footer {
    margin-top: auto;
}

/* ========================================
   LiveView — Phoenix loading states
   ======================================== */

.phx-submit-loading .btn {
    opacity: 0.7;
    pointer-events: none;
}

/* Flash dismissal click hint */
[role="alert"] {
    cursor: pointer;
}

/* ========================================
   Sundown Notice Banner
   (not in legacy bundle — new for shutdown)
   ======================================== */

.sundown-notice {
    background-color: #f57f17;
    color: #fff;
    padding: 12px 0;
    text-align: center;
    font-size: 0.95rem;
}

.sundown-notice a {
    color: #fff;
    text-decoration: underline;
    font-weight: 500;
}

/* ========================================
   Character Profile — Shared
   ======================================== */

.character-app {
    /* Color scheme CSS variables (set inline by LiveView) */
    --color-primary: #26a69a;
    --color-text: rgba(255, 255, 255, 0.9);
    --color-text-medium: rgba(255, 255, 255, 0.7);
    --color-text-light: rgba(255, 255, 255, 0.5);
    --color-background: #262626;
    --color-card-background: #333;
    --color-card-header-background: #2a2a2a;
    --color-image-background: #1a1a1a;
    --color-border: rgba(255, 255, 255, 0.1);
}

/* ========================================
   V2 Header
   ======================================== */

.v2-header-summary {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    padding-bottom: 1rem;
}

.v2-avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}

.v2-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.v2-header-info {
    flex: 1;
}

.v2-header-info .name {
    margin: 0 0 0.25rem 0;
}

.v2-header-info .species {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

/* ========================================
   V2 Sidebar
   ======================================== */

.sidebar {
    position: sticky;
    top: 64px;
    padding-top: 1rem;
}

.v2-sidebar-user {
    margin-bottom: 1rem;
}

.v2-sidebar-user .caption {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ========================================
   Masonry Gallery
   ======================================== */

.gallery-masonry {
    column-count: 4;
    column-gap: 12px;
}

.gallery-masonry-item {
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: 2px;
    overflow: hidden;
}

.gallery-masonry-item img {
    width: 100%;
    display: block;
}

.gallery-image-caption {
    padding: 4px 8px;
    font-size: 0.85rem;
}

/* Responsive masonry columns */
@media only screen and (max-width: 600px) {
    .gallery-masonry {
        column-count: 2;
    }
}

@media only screen and (min-width: 601px) and (max-width: 992px) {
    .gallery-masonry {
        column-count: 3;
    }
}

@media only screen and (min-width: 993px) {
    .gallery-masonry {
        column-count: 4;
    }
}