/* ============================================
   STYLES/CONTENT-AREA.CSS
   Estilos específicos para conteúdo dentro de .content-area
   ============================================ */

/* ===== EMPTY STATE ===== */
.content-area .empty-state {
    padding: 80px 24px;
    text-align: center;
    color: #999999;
    font-size: 14px;
}

/* ===== GRID DE ARQUIVOS ===== */
.content-area .date-group {
    margin-bottom: 40px;
}

.content-area .date-header {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.content-area .thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 1px;
}

.content-area .thumbnail-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    cursor: pointer;
    overflow: hidden;
    background-color: #f5f5f5;
    transition: all 0.2s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.content-area .thumbnail-item.selected {
    box-shadow: 0 0 0 3px #1a1a1a;
}

.content-area .thumbnail-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-area .video-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-area .video-badge i {
    color: #ffffff;
    font-size: 12px;
    margin-left: 1px;
}

.content-area .selection-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    background-color: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.content-area .selection-badge i {
    color: #ffffff;
    font-size: 10px;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #ffffff;
    max-width: 1400px;
    width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    position: relative;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background-color: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #000000;
    transform: rotate(90deg);
}

/* Layout Split Desktop */
.modal-body-split {
    display: flex;
    height: 90vh;
}

.modal-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    padding: 40px;
}

.modal-right {
    width: 400px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.info-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 40px 24px 24px;
}

.media-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-container img,
.media-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 24px;
}

.info-table tr {
    border-bottom: 1px solid #e5e5e5;
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table td {
    padding: 12px 0;
}

.info-table td:first-child {
    font-weight: 600;
    color: #404040;
    width: 140px;
    vertical-align: top;
}

.info-table td:last-child {
    color: #666666;
    word-break: break-word;
}

.download-container {
    position: sticky;
    bottom: 0;
    background-color: #ffffff;
    padding: 16px 0;
    text-align: center;
    border-top: 1px solid #e5e5e5;
}

.download-btn {
    width: 100%;
    padding: 12px 24px;
    background-color: #1a1a1a;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background-color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.download-btn:active {
    transform: translateY(0);
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {
    /* Empty State */
    .content-area .empty-state {
        padding: 40px 16px;
        font-size: 13px;
    }

    /* Date Groups */
    .content-area .date-group {
        margin-bottom: 24px;
    }

    .content-area .date-header {
        font-size: 13px;
        margin-bottom: 10px;
        padding-bottom: 6px;
        position: sticky;
        top: 0;
        background-color: #fafafa;
        z-index: 1;
    }

    /* Thumbnails Grid - Otimizado para mobile */
    .content-area .thumbnails-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 2px;
    }

    .content-area .thumbnail-item {
        border-radius: 4px;
    }

    .content-area .thumbnail-item.selected {
        box-shadow: 0 0 0 2px #1a1a1a;
    }

    .content-area .video-badge {
        top: 2px;
        right: 2px;
        width: 20px;
        height: 20px;
    }

    .content-area .video-badge i {
        font-size: 10px;
    }

    .content-area .selection-badge {
        bottom: 2px;
        right: 2px;
        width: 14px;
        height: 14px;
    }

    .content-area .selection-badge i {
        font-size: 9px;
    }

    /* Modal Mobile - Vertical Layout */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
        animation: slideUpMobile 0.3s ease;
    }

    @keyframes slideUpMobile {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .modal-body-split {
        flex-direction: column;
        height: 95vh;
    }

    .modal-left {
        flex: 0 0 auto;
        max-height: 40vh;
        background-color: #000000;
        padding: 20px;
    }

    .modal-right {
        width: 100%;
        flex: 1;
        overflow-y: auto;
    }

    .info-scroll {
        padding: 20px 16px 80px;
        overflow-y: visible;
    }

    .modal-close {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 18px;
        background-color: rgba(0, 0, 0, 0.7);
    }

    .media-container img,
    .media-container video {
        max-height: 35vh;
        border-radius: 6px;
    }

    .info-table {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .info-table td {
        padding: 10px 0;
        display: block;
    }

    .info-table td:first-child {
        width: 100%;
        padding-bottom: 4px;
        font-size: 11px;
        color: #666666;
        font-weight: 500;
    }

    .info-table td:last-child {
        width: 100%;
        padding-top: 0;
        font-size: 13px;
        color: #1a1a1a;
    }

    .info-table tr {
        border-bottom: 1px solid #f0f0f0;
        padding: 8px 0;
        display: block;
    }

    .download-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 16px;
        background-color: #ffffff;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
        z-index: 20;
    }

    .download-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 14px;
    }
}

/* ===== RESPONSIVE EXTRA SMALL (< 480px) ===== */
@media (max-width: 480px) {
    .content-area .thumbnails-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2px;
    }

    .content-area .date-header {
        font-size: 12px;
    }
}

/* ===== RESPONSIVE LARGE SCREENS ===== */
@media (min-width: 1200px) {
    .content-area .thumbnails-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    
    .modal-right {
        width: 450px;
    }
}

@media (min-width: 1600px) {
    .content-area .thumbnails-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .modal-right {
        width: 500px;
    }
}