/**
 * Estilos para el panel "Mis Anuncios" en Mi Cuenta
 */

/* Status badges */
.wcma-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

.wcma-status-pendiente_aprobacion {
    background: #f0ad4e;
    color: white;
}

.wcma-status-aprobado {
    background: #5cb85c;
    color: white;
}

.wcma-status-rechazado {
    background: #d9534f;
    color: white;
}

.wcma-status-pendiente_pago {
    background: #5bc0de;
    color: white;
}

.wcma-status-activo {
    background: #0073aa;
    color: white;
}

.wcma-status-expirado {
    background: #999;
    color: white;
}

.wcma-status-draft {
    background: #95a5a6;
    color: white;
}

/* Ads list */
.wcma-ads-list {
    margin: 20px 0;
}

/* Single ad */
.wcma-single-ad {
    margin: 20px 0;
}

.wcma-ad-info,
.wcma-ad-form-data {
    margin: 30px 0;
}

.wcma-ad-info h3,
.wcma-ad-form-data h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

/* Payment notice */
.wcma-payment-notice {
    margin: 20px 0;
    padding: 15px;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
}

.wcma-payment-notice p {
    margin: 0 0 10px 0;
}

/* Gallery */
.wcma-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wcma-gallery img {
    max-width: 150px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Botones de acciones compactos */
.wcma-actions-compact {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.wcma-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.wcma-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wcma-btn .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

/* Colores específicos por acción */
.wcma-btn-view {
    border-color: #0073aa;
    color: #0073aa;
}

.wcma-btn-view:hover {
    background: #0073aa;
    color: #fff;
}

.wcma-btn-edit {
    border-color: #f0ad4e;
    color: #f0ad4e;
}

.wcma-btn-edit:hover {
    background: #f0ad4e;
    color: #fff;
}

.wcma-btn-pause {
    border-color: #d9534f;
    color: #d9534f;
}

.wcma-btn-pause:hover {
    background: #d9534f;
    color: #fff;
}

.wcma-btn-activate {
    border-color: #5cb85c;
    color: #5cb85c;
}

.wcma-btn-activate:hover {
    background: #5cb85c;
    color: #fff;
}

.wcma-btn-pay {
    border-color: #5bc0de;
    color: #5bc0de;
}

.wcma-btn-pay:hover {
    background: #5bc0de;
    color: #fff;
}

.wcma-btn-renew {
    border-color: #0073aa;
    color: #0073aa;
    cursor: pointer;
}

.wcma-btn-renew:hover {
    background: #0073aa;
    color: #fff;
}

.wcma-btn-renew:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wcma-btn-duplicate {
    border-color: #777;
    color: #777;
}

.wcma-btn-duplicate:hover {
    background: #777;
    color: #fff;
}

.wcma-btn-delete {
    border-color: #d9534f;
    color: #d9534f;
}

.wcma-btn-delete:hover {
    background: #d9534f;
    color: #fff;
}

.wcma-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Estado pausado */
.wcma-status-pausado {
    background: #f39c12;
    color: white;
}

/* Tabla más compacta y estilizada */
.wcma-ads-list .woocommerce-orders-table {
    font-size: 13px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.wcma-ads-list .woocommerce-orders-table thead {
    background: #f8f9fa;
}

.wcma-ads-list .woocommerce-orders-table th {
    padding: 12px 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
}

.wcma-ads-list .woocommerce-orders-table td {
    padding: 14px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.wcma-ads-list .woocommerce-orders-table tbody tr {
    transition: background-color 0.2s ease;
}

.wcma-ads-list .woocommerce-orders-table tbody tr:hover {
    background-color: #f8f9fa;
}

.wcma-ads-list .woocommerce-orders-table tbody tr:last-child td {
    border-bottom: none;
}

.wcma-actions-cell {
    min-width: 180px;
}

/* Columna de anuncio con marca/modelo e ID */
.wcma-ad-info-cell {
    min-width: 200px;
}

.wcma-ad-info-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    padding: 4px 0;
}

.wcma-ad-info-link:hover {
    color: #0073aa;
}

.wcma-ad-main-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 5px;
}

.wcma-ad-marca {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    line-height: 1.2;
}

.wcma-ad-modelo {
    font-weight: 600;
    font-size: 13px;
    color: #666;
    line-height: 1.2;
}

.wcma-ad-id-small {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #999;
    font-family: 'Courier New', monospace;
    line-height: 1;
}

.wcma-ad-id-small .dashicons {
    width: 12px;
    height: 12px;
    font-size: 12px;
}

.wcma-ad-info-link:hover .wcma-ad-id-small {
    color: #0073aa;
}

/* Columna de título */
.wcma-ads-list .woocommerce-orders-table td[data-title*="Título"] {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

/* Columna de producto */
.wcma-ads-list .woocommerce-orders-table td[data-title*="Producto"] {
    font-size: 12px;
    color: #666;
}

/* Columna de fecha */
.wcma-ads-list .woocommerce-orders-table td[data-title*="Fecha"] {
    font-size: 12px;
    color: #999;
}

/* Diseño de página de detalles del anuncio */
.wcma-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.wcma-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s ease;
}

.wcma-back-btn:hover {
    background: #e8e8e8;
    color: #000;
    transform: translateX(-3px);
}

.wcma-ad-actions {
    display: flex;
    gap: 8px;
}

.wcma-ad-actions .wcma-btn {
    width: auto;
    height: auto;
    padding: 10px 16px;
    gap: 6px;
}

.wcma-ad-actions .wcma-btn .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* Título y estado */
.wcma-ad-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.wcma-ad-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.wcma-status-large {
    font-size: 16px;
    padding: 10px 20px;
}

/* Cards de información */
.wcma-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.wcma-info-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.wcma-info-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.wcma-info-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #0073aa;
    border-radius: 50%;
    flex-shrink: 0;
}

.wcma-info-card-icon .dashicons {
    color: #fff;
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.wcma-info-card-content {
    flex: 1;
}

.wcma-info-card-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.wcma-info-card-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wcma-info-card-value a {
    color: #0073aa;
    text-decoration: none;
}

.wcma-info-card-value a:hover {
    text-decoration: underline;
}

/* Secciones */
.wcma-section {
    margin-bottom: 40px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.wcma-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.wcma-section-title .dashicons {
    color: #0073aa;
    width: 24px;
    height: 24px;
    font-size: 24px;
}

/* Galería estilo shortcode */
.wcma-gallery-shortcode-style {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wcma-main-image-display {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.wcma-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.15s ease;
}

.wcma-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
}

.wcma-thumbnails-display {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.wcma-thumbnail-display-item {
    aspect-ratio: 1;
    background: #f5f5f5;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wcma-thumbnail-display-item:hover {
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.wcma-thumbnail-display-item.active {
    border-color: #0073aa;
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.wcma-thumb-display-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wcma-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border: 1px dashed #ccc;
}

.wcma-placeholder-label {
    font-size: 11px;
    color: #999;
    text-align: center;
    padding: 5px;
    line-height: 1.2;
}

/* Sección de Video */
.wcma-video-display-section {
    margin-top: 15px;
}

.wcma-video-display-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.wcma-video-display-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wcma-video-placeholder-display {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    background: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wcma-video-placeholder-display .dashicons {
    width: 48px;
    height: 48px;
    font-size: 48px;
    color: #999;
}

.wcma-placeholder-text {
    font-size: 14px;
    color: #999;
}

/* Sección de Documento */
.wcma-documento-display-section {
    margin-top: 15px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.wcma-documento-display-header {
    margin-bottom: 15px;
}

.wcma-documento-display-label {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wcma-documento-display-instructions {
    margin: 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.wcma-documento-display-preview {
    display: inline-block;
}

.wcma-documento-display-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 6px;
    text-decoration: none;
    color: #0073aa;
    font-weight: 600;
    transition: all 0.2s ease;
}

.wcma-documento-display-link:hover {
    background: #0073aa;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,115,170,0.2);
}

.wcma-documento-display-icon {
    font-size: 24px;
}

.wcma-documento-display-text {
    font-size: 14px;
}

.wcma-documento-placeholder-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: #fff;
    border: 1px dashed #ccc;
    border-radius: 6px;
    color: #999;
}

.wcma-documento-placeholder-display .wcma-documento-display-icon {
    font-size: 24px;
}

/* Grid de especificaciones */
.wcma-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.wcma-spec-item {
    padding: 15px;
    background: #f9f9f9;
    border-left: 3px solid #0073aa;
    border-radius: 4px;
}

.wcma-spec-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.wcma-spec-value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

/* Responsive tables */
@media screen and (max-width: 768px) {
    .wcma-ads-list table {
        font-size: 13px;
    }
    
    .wcma-status {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .wcma-actions-compact {
        justify-content: flex-start;
    }
    
    .wcma-btn {
        width: 28px;
        height: 28px;
    }
    
    .wcma-btn .dashicons {
        width: 16px;
        height: 16px;
        font-size: 16px;
    }
    
    /* Página de detalles responsive */
    .wcma-ad-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .wcma-ad-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .wcma-ad-actions .wcma-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .wcma-ad-title {
        font-size: 24px;
    }
    
    .wcma-ad-title-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wcma-info-cards {
        grid-template-columns: 1fr;
    }
    
    .wcma-section {
        padding: 20px;
    }
    
    .wcma-section-title {
        font-size: 18px;
    }
    
    .wcma-thumbnails-display {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .wcma-placeholder-label {
        font-size: 9px;
    }
    
    .wcma-specs-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media screen and (max-width: 480px) {
    .wcma-thumbnails-display {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .wcma-placeholder-label {
        font-size: 8px;
    }
}
