/* ==============================================
   ESTILOS GLOBAIS PARA COMPONENTES DE MÍDIA
   ============================================== */

   .top-slides-container {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #c3c4c7;
}

/* ==============================================
   GRID DE SLIDES (DESKTOP/MOBILE/TECNOLOGIA)
   ============================================== */

.slides-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

/* Desktop: 4 colunas */
.slides-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Mobile: 2 colunas */
@media (max-width: 1600px) {
    .slides-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dispositivos pequenos: 1 coluna */
@media (max-width: 782px) {
    .slides-grid {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   ITEM INDIVIDUAL DE SLIDE
   ============================================== */

.slide-item {
    position: relative;
    border: 2px dashed #c3c4c7;
    border-radius: 4px;
    background: #fff;
    transition: all 0.3s ease;
    overflow: hidden;
}

.slide-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ==============================================
   PREVIEW DA IMAGEM
   ============================================== */

.image-preview {
    position: relative;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f1;
    cursor: move;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.image-preview:hover img {
    opacity: 0.8;
}

/* ==============================================
   BOTÃO DE REMOÇÃO
   ============================================== */

.remove-slide {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc3545;
    color: white !important;
    border: none;
    border-radius: 3px;
    padding: 5px 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    text-decoration: none !important;
}

.remove-slide .dashicons {
    font-size: 16px;
    width: auto;
    height: auto;
}

.image-preview:hover .remove-slide {
    bottom: 10px;
    opacity: 1;
}

/* ==============================================
   BOTÃO DE UPLOAD
   ============================================== */

.button.top-upload-slides {
    margin-top: 10px !important;
    background: #2271b1 !important;
    border-color: #2271b1 !important;
    color: #fff !important;
    text-shadow: none !important;
    transition: all 0.3s ease;
}

.button.top-upload-slides:hover {
    background: #135e96 !important;
    border-color: #135e96 !important;
}

/* ==============================================
   TEXTOS DESCRITIVOS
   ============================================== */

.top-slides-container .description {
    color: #646970;
    font-size: 13px;
    margin: 10px 0 0;
    font-style: italic;
}

/* ==============================================
   EFEITOS DE ARRASTE
   ============================================== */

.slide-placeholder {
    background: #f0f6fc;
    border: 2px dashed #2271b1;
    border-radius: 4px;
}

.ui-sortable-helper {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: rotate(2deg);
    z-index: 100;
}

/* ==============================================
   RESPONSIVIDADE ESPECÍFICA
   ============================================== */

@media (max-width: 1200px) {
    .image-preview {
        height: 150px;
    }
    
    .slide-item {
        min-height: 150px;
    }
}

@media (max-width: 782px) {
    .image-preview {
        height: 200px;
    }
    
    .remove-slide {
        font-size: 12px;
        padding: 3px 8px;
        bottom: 5px;
    }
}

/* ==============================================
   ESTILOS ESPECÍFICOS PARA TECNOLOGIA
   ============================================== */

/* Container específico para upload único */
.top-plan-metabox .top-slides-container {
    background: transparent;
    border: none;
    padding: 0;
}

.top-plan-metabox .slides-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
}

.top-plan-metabox .image-preview {
    height: 200px;
    /* Fundo quadriculado para transparência mais visível e quadrado */
    background-color: #e0e0e0;
    background-image:
      linear-gradient(0deg, #bdbdbd 25%, transparent 25%, transparent 75%, #bdbdbd 75%),
      linear-gradient(90deg, #bdbdbd 25%, transparent 25%, transparent 75%, #bdbdbd 75%);
    background-size: 32px 32px;
    background-position: 0 0, 0 0;
}

/* ==============================================
   ESTADOS DE ERRO/VALIDAÇÃO
   ============================================== */

.slide-item.invalid {
    border-color: #dc3545;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

