/* ============================================
   Bilder fra dagen – opplasting og fotovegg
   Bygger på variablene i style.css
   ============================================ */

.bilder-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Toppstripe --- */
.bilder-top {
    padding: 16px 20px;
    display: flex;
    justify-content: center;
}

.bilder-home {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
}

.bilder-monogram {
    height: 42px;
    width: auto;
}

/* --- Hovedinnhold --- */
.bilder-main {
    flex: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 8px 20px 64px;
}

.bilder-title {
    text-align: center;
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--charcoal);
    margin-top: 8px;
}

.bilder-subtitle {
    text-align: center;
    color: var(--text-light);
    max-width: 520px;
    margin: 10px auto 32px;
}

/* --- Opplastingspanel --- */
.upload-panel {
    background: var(--white);
    border: 1px solid rgba(197, 165, 114, 0.25);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 24px;
    margin-bottom: 48px;
}

.upload-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 26px 12px;
    background: var(--cream);
    border: 2px solid var(--gold-light);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    color: var(--charcoal);
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.upload-btn:hover,
.upload-btn:focus-visible {
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.upload-btn:active {
    transform: translateY(0);
}

.upload-btn-icon {
    font-size: 2rem;
    line-height: 1;
}

.upload-btn-label {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
}

.upload-btn-hint {
    font-size: 0.78rem;
    color: var(--text-light);
}

/* --- Opplastingskø --- */
.upload-queue {
    list-style: none;
    margin-top: 4px;
}

.upload-queue:not(:empty) {
    margin-top: 20px;
}

.upload-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border-top: 1px solid var(--cream-dark);
    font-size: 0.85rem;
}

.upload-item-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.upload-item-bar {
    flex: 1;
    height: 6px;
    background: var(--cream-dark);
    border-radius: 3px;
    overflow: hidden;
}

.upload-item-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--gold);
    border-radius: 3px;
    transition: width 0.2s ease;
}

.upload-item-status {
    flex-shrink: 0;
    width: 70px;
    text-align: right;
    color: var(--text-light);
}

.upload-item.ok .upload-item-status {
    color: var(--sage-dark);
    font-weight: 600;
}

.upload-item.err .upload-item-status {
    color: #B4533A;
    font-weight: 600;
    width: auto;
}

/* --- Lagre på hjem-skjermen --- */
.install-row {
    text-align: center;
    margin: -28px 0 40px;
}

.install-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--white);
    border: 1.5px solid var(--gold);
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--charcoal);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.install-btn:hover {
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}

.ios-guide {
    max-width: 420px;
    margin: 16px auto 0;
    padding: 18px 22px;
    background: var(--white);
    border: 1px solid rgba(197, 165, 114, 0.35);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    text-align: left;
    font-size: 0.88rem;
}

.ios-guide ol {
    margin: 10px 0 0 20px;
}

.ios-guide li {
    margin-bottom: 6px;
}

/* --- Fotovegg --- */
.wall-header {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.wall-title {
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    color: var(--charcoal);
}

.wall-count {
    color: var(--gold-dark);
    font-weight: 600;
    font-size: 0.95rem;
}

.wall-empty {
    text-align: center;
    color: var(--text-light);
    padding: 32px 0;
}

.wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.wall-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--cream-dark);
    cursor: pointer;
    border: none;
    padding: 0;
}

.wall-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wall-item.new {
    animation: wall-pop 0.5s ease;
}

@keyframes wall-pop {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Lysboks --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(30, 28, 25, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-medium);
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--cream);
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
}

.bilder-footer {
    margin-top: auto;
}

@media (max-width: 480px) {
    .upload-buttons {
        gap: 10px;
    }

    .upload-btn {
        padding: 20px 8px;
    }

    .wall-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 6px;
    }
}
