/* Login */
.login-section {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.btn-google {
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
}

/* Photo grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    padding: 1rem 0;
}

.photo-card {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: border-color 0.2s, transform 0.15s;
    background: var(--pico-muted-border-color);
}

.photo-card:hover {
    transform: scale(1.02);
}

.photo-card.selected {
    border-color: var(--pico-primary);
}

/* Select button (Google Photos-style checkbox) */
.photo-card .select-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
    padding: 0;
    line-height: 1;
}

.photo-card:hover .select-btn {
    opacity: 1;
}

.photo-card.selected .select-btn {
    opacity: 1;
    background: var(--pico-primary);
    border-color: var(--pico-primary);
}

.photo-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.photo-card .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    font-size: 0.85rem;
    color: var(--pico-muted-color);
    padding: 1rem;
    text-align: center;
}

/* Gallery card (dashboard) */
.gallery-card {
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.gallery-card h3 {
    margin-bottom: 0.3rem;
}

.gallery-card .meta {
    color: var(--pico-muted-color);
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.gallery-card .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.gallery-card .actions button,
.gallery-card .actions a {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-draft { background: #e2e8f0; color: #475569; }
.badge-published { background: #dcfce7; color: #166534; }
.badge-submitted { background: #dbeafe; color: #1e40af; }
.badge-archived { background: #f1f5f9; color: #94a3b8; }

/* Counter badge on client page */
.counter-badge {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Client link */
.client-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    word-break: break-all;
}

.client-link code,
.client-link a {
    font-size: 0.8rem;
    background: var(--pico-muted-border-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

/* Disabled photo card */
.photo-card.disabled {
    pointer-events: none;
    opacity: 0.6;
}

/* Preview progress bar */
.preview-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--pico-muted-color);
}

.preview-progress .progress-bar {
    flex: 1;
    height: 6px;
    background: var(--pico-muted-border-color);
    border-radius: 3px;
    overflow: hidden;
    max-width: 300px;
}

.preview-progress .progress-fill {
    height: 100%;
    background: var(--pico-primary);
    border-radius: 3px;
    transition: width 0.3s;
    width: 0;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
    padding: 0;
    width: auto;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    z-index: 1001;
    padding: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
    width: auto;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

.lightbox-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    font-size: 1rem;
    z-index: 1001;
}

.lightbox-footer button {
    color: #fff;
    border-color: #fff;
}

.lightbox-footer button.selected {
    background: var(--pico-primary);
    border-color: var(--pico-primary);
}

/* Filename labels */
.photo-filename {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 4px;
}

.lightbox-filename {
    color: #fff;
    font-size: 0.85rem;
    opacity: 0.9;
}
