/* ═══════════════════════════════════════════════════════════════
   GALLERY / IMAGES PAGE - Terminal Theme
   ═══════════════════════════════════════════════════════════════ */

/* Container uses .container-xl utility */
/* Grid uses .grid-images utility */

/* ═══════════════════════════════════════════════════════════════
   IMAGES COUNT
   ═══════════════════════════════════════════════════════════════ */

.images-count {
    font-size: 0.85rem;
    color: rgba(0, 255, 65, 0.7);
    background: rgba(0, 255, 65, 0.1);
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 255, 65, 0.3);
    font-family: "Courier New", Courier, monospace;
}

/* ═══════════════════════════════════════════════════════════════
   IMAGE CARDS
   ═══════════════════════════════════════════════════════════════ */

.image-card {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 255, 65, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.image-card:hover {
    border-color: var(--phosphor-green);
    box-shadow:
        0 0 20px rgba(0, 255, 65, 0.3),
        inset 0 0 30px rgba(0, 255, 65, 0.05);
    transform: translateY(-2px);
}

.image-link {
    display: block;
    text-decoration: none;
}

.image-thumb-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
}

.image-thumb {
    width: 150px;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
    filter: brightness(0.9);
}

.image-card:hover .image-thumb {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 1rem 0.75rem 0.75rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.image-card:hover .image-overlay {
    transform: translateY(0);
}

.image-filename {
    color: var(--phosphor-green);
    font-size: 0.75rem;
    font-family: "Courier New", Courier, monospace;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-date {
    color: rgba(0, 255, 65, 0.6);
    font-size: 0.65rem;
    font-family: "Courier New", Courier, monospace;
}

/* ═══════════════════════════════════════════════════════════════
   REMOVE FROM ALBUM BUTTON
   ═══════════════════════════════════════════════════════════════ */

.remove-from-album-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 10;
    width: 20px;
    height: 20px;
    background: var(--phosphor-green);
    border: 1px solid var(--phosphor-green);
    color: var(--color-error);
    font-size: 0.7rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    padding: 0;
    font-family: var(--font-mono);
    text-shadow: none;
}

.image-card:hover .remove-from-album-btn {
    opacity: 1;
}

.remove-from-album-btn:hover {
    background: var(--phosphor-dim);
    border-color: var(--phosphor-dim);
    color: #ff0000;
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */

.no-images {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(0, 255, 65, 0.3);
}

.no-images-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: grayscale(100%) brightness(150%);
    opacity: 0.6;
}

.no-images-title {
    color: var(--phosphor-green);
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0 0 0.5rem;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.no-images-hint {
    color: rgba(0, 255, 65, 0.6);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .panel-body {
        padding: 1rem;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }

    .image-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.4));
    }
}

@media (max-width: 480px) {
    .images-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════════
   BULK SELECTION
   ═══════════════════════════════════════════════════════════════ */

.bulk-actions-bar {
    background: rgba(0, 255, 65, 0.05);
    border-bottom: 2px solid rgba(0, 255, 65, 0.3);
    padding: 1rem 1.5rem 0.75rem;
}

.bulk-actions-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.bulk-actions-left,
.bulk-actions-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.selected-count {
    color: var(--phosphor-green);
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.image-select-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
}

.image-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--phosphor-green);
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #0d120d;
    border: 2px solid rgba(0, 255, 65, 0.5);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid rgba(0, 255, 65, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--phosphor-green);
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.modal-close {
    background: none;
    border: none;
    color: var(--phosphor-green);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #ff6b6b;
    transform: scale(1.2);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 2px solid rgba(0, 255, 65, 0.3);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Responsive bulk actions */
@media (max-width: 768px) {
    .bulk-actions-content {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-actions-left,
    .bulk-actions-right {
        justify-content: center;
        flex-wrap: wrap;
    }

    .modal-content {
        width: 95%;
    }
}