/**
 * Estilos Modernos para Plantillas de Renderizado — Apúntate Enterprise DM v2.7.0
 *
 * @package Apuntate_Enterprise_DM
 */

/* ==========================================================================
   Contenedor Base Común
   ========================================================================== */
.apn-embed-wrapper,
.apn-card {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 18px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.apn-embed-wrapper *,
.apn-embed-wrapper *:before,
.apn-embed-wrapper *:after,
.apn-card *,
.apn-card *:before,
.apn-card *:after {
    box-sizing: border-box;
}

.apn-card-badge-footer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}

/* ==========================================================================
   1. Plantilla Bento SaaS Grid (.apn-template-bento)
   ========================================================================== */
.apn-template-bento {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    max-width: 680px;
    position: relative;
    overflow: hidden;
}

.apn-template-bento:hover {
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.apn-bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.apn-bento-item {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.apn-bento-item-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

.apn-bento-item-val {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 2px;
}

/* ==========================================================================
   2. Plantilla Glassmorphic Hero (.apn-template-glass)
   ========================================================================== */
.apn-template-glass {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 15px 35px rgba(31, 38, 135, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    max-width: 660px;
    position: relative;
}

.apn-template-glass:hover {
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.12);
}

/* ==========================================================================
   3. Plantilla Split Preview (.apn-template-split)
   ========================================================================== */
.apn-template-split {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    max-width: 680px;
}

.apn-split-cover {
    width: 110px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-right: 1px solid #bfdbfe;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    flex-shrink: 0;
    font-size: 36px;
}

.apn-split-body {
    flex: 1;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (max-width: 580px) {
    .apn-template-split {
        flex-direction: column;
    }
    .apn-split-cover {
        width: 100%;
        height: 80px;
        border-right: none;
        border-bottom: 1px solid #bfdbfe;
    }
}

/* ==========================================================================
   4. Plantilla Compact Row (.apn-template-compact)
   ========================================================================== */
.apn-template-compact {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    max-width: 100%;
    min-height: 52px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.apn-template-compact:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.apn-compact-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
}

.apn-compact-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apn-compact-pill {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* ==========================================================================
   Botón Descargar Universal
   ========================================================================== */
.apn-btn-download-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 6px;
    transition: background 0.15s ease, transform 0.1s ease;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.apn-btn-download-action:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.35);
}

/* ==========================================================================
   5. Plantilla Gradient Glow (.apn-template-gradient)
   ========================================================================== */
.apn-template-gradient {
    position: relative;
    background: #0f172a;
    border-radius: 14px;
    padding: 2px;
    max-width: 680px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.3);
}

.apn-gradient-inner {
    background: #0f172a;
    border-radius: 12px;
    padding: 20px 24px;
    color: #ffffff;
}

.apn-gradient-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.apn-gradient-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.apn-gradient-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.apn-gradient-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.apn-gradient-meta-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.apn-gradient-counter {
    color: #60a5fa;
    font-weight: 600;
}

.apn-gradient-desc {
    margin: 12px 0;
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.4;
}

.apn-gradient-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
    margin-top: 12px;
}

.apn-gradient-tag {
    font-size: 10px;
    font-weight: 700;
    color: #a855f7;
    background: rgba(168, 85, 247, 0.15);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.apn-btn-gradient-glow {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
}

.apn-btn-gradient-glow:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
    transform: translateY(-1px);
}

/* ==========================================================================
   6. Plantilla Minimal Floating Badge (.apn-template-minimal-float)
   ========================================================================== */
.apn-template-minimal-float {
    max-width: 600px;
}

.apn-float-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 6px 8px 6px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.apn-float-pill:hover {
    box-shadow: 0 12px 25px -4px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.apn-float-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.apn-float-icon {
    font-size: 18px;
    display: flex;
    align-items: center;
}

.apn-float-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.apn-float-meta {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 10px;
}

.apn-float-downloads {
    font-size: 11px;
    color: #0284c7;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.apn-btn-float-action {
    background: #2563eb;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.apn-btn-float-action:hover {
    background: #1d4ed8;
}

.apn-float-security-note {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
    padding-left: 14px;
}

/* ==========================================================================
   7. Plantilla Corporate Hub Grid (.apn-template-corporate)
   ========================================================================== */
.apn-template-corporate {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-top: 4px solid #1e3a8a;
    border-radius: 8px;
    padding: 20px 24px;
    max-width: 680px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.apn-corp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.apn-corp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.apn-corp-icon-box {
    width: 38px;
    height: 38px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.apn-corp-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.apn-corp-tagline {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.apn-corp-badge-pro {
    font-size: 10px;
    font-weight: 800;
    color: #1e3a8a;
    background: #dbeafe;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.apn-corp-desc {
    margin: 12px 0;
    font-size: 13px;
    color: #334155;
    line-height: 1.4;
}

.apn-corp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
    margin: 14px 0;
}

.apn-corp-cell {
    text-align: center;
}

.apn-corp-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
}

.apn-corp-val {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.apn-corp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.apn-btn-corp-cta {
    background: #1e3a8a;
}

.apn-btn-corp-cta:hover {
    background: #172554;
}

/* ==========================================================================
   Alineación Horizontal de Metadatos y Separadores (v3.8.0)
   ========================================================================== */
.apn-card-meta-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: #475569;
    margin: 4px 0 6px 0;
}

.apn-card-meta-row .apn-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    line-height: 1.2;
}

.apn-card-meta-row .apn-meta-separator {
    color: #cbd5e1;
    font-weight: 300;
    user-select: none;
}

.apn-card-meta-row .apn-download-badge svg {
    flex-shrink: 0;
    color: #2563eb;
}

@media (max-width: 480px) {
    .apn-card-meta-row {
        gap: 12px;
    }
}


