/* WC Catálogo PDF – Estilos frontend */

.wcpdf-wrap {
    width: 100%; margin: 0 0 2em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
}
.wcpdf-title { font-size: 1.4em; margin-bottom: 1em; color: #1a1a1a; }

.wcpdf-form {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.2em 1.4em;
    display: flex; flex-direction: column; gap: 1em;
}

/* ── Cabecera de la sección categorías ── */
.wcpdf-field { display: flex; flex-direction: column; gap: 0.3em; }
.wcpdf-cat-header {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 8px;
}
.wcpdf-cat-label { font-weight: 600; font-size: 0.9em; color: #444; }
.wcpdf-cat-actions { display: flex; align-items: center; gap: 4px; }
.wcpdf-link-btn {
    background: none; border: none; padding: 0;
    font-size: 0.8em; color: #1a5276; cursor: pointer; text-decoration: underline;
}
.wcpdf-link-btn:hover { color: #154360; }
.wcpdf-sep { color: #bbb; font-size: 0.8em; }

/* ── Columnas: una por categoría padre ── */
.wcpdf-cat-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px;
}

.wcpdf-cat-col {
    flex: 1 1 160px;       /* mínimo 160px, crece para ocupar espacio */
    min-width: 150px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 6px 4px 4px;
}

/* ── Items (label + checkbox) ── */
.wcpdf-cat-item {
    display: flex; align-items: flex-start; gap: 5px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 0.83em; color: #333;
    line-height: 1.35;
    border-radius: 3px;
    transition: background 0.1s;
    width: 100%;
}
.wcpdf-cat-item:hover { background: #eef2f7; }

.wcpdf-cat-parent {
    font-weight: 700; color: #1a1a1a;
    font-size: 0.88em;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 4px; margin-bottom: 2px;
}
.wcpdf-cat-child { color: #444; font-weight: normal; }

.wcpdf-cat-item input[type="checkbox"] {
    width: 13px; height: 13px; margin-top: 1px;
    flex-shrink: 0; cursor: pointer;
    accent-color: #1a5276;
}
.wcpdf-cat-count { color: #bbb; font-size: 0.82em; margin-left: 2px; white-space: nowrap; }

/* ── Toggle ▸/▾ para sub-subcategorías ── */
.wcpdf-child-wrap {
    display: flex;
    align-items: center;
}
.wcpdf-toggle-sub {
    background: none; border: none; padding: 0;
    width: 16px; flex-shrink: 0;
    font-size: 0.75em; color: #888;
    cursor: pointer; line-height: 1;
    transition: color 0.15s;
}
.wcpdf-toggle-sub:hover { color: #1a5276; }
.wcpdf-toggle-placeholder { width: 16px; flex-shrink: 0; display: inline-block; }
.wcpdf-child-wrap .wcpdf-cat-item { flex: 1; }
.wcpdf-subsub { padding-left: 16px; }
.wcpdf-cat-subsub { font-size: 0.8em; color: #666; }

/* ── Contador ── */
.wcpdf-selected-count { font-size: 0.8em; color: #999; margin-top: 6px; }
.wcpdf-count-active   { color: #1a5276; font-weight: 600; }

/* ── Separador ── */
.wcpdf-hr { border: none; border-top: 1px solid #e0e0e0; }

/* ── Precios ── */
.wcpdf-checks { gap: 0.4em; }
.wcpdf-checks-label { font-weight: 600; font-size: 0.9em; color: #444; }
.wcpdf-check { display: flex; align-items: center; gap: 6px; font-size: 0.9em; color: #333; cursor: pointer; }
.wcpdf-check input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; accent-color: #1a5276; }

/* ── PVP ── */
.wcpdf-pvp-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 8px 12px;
    font-size: 0.9em;
}
.wcpdf-pvp-row label { font-weight: 600; color: #444; white-space: nowrap; }
.wcpdf-pvp-row input[type="number"] {
    width: 80px !important; padding: 4px 7px;
    border: 1px solid #ccc; border-radius: 5px; font-size: 0.95em;
}
.wcpdf-hint { font-size: 0.82em; color: #888; }

/* ── Botón ── */
.wcpdf-btn-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wcpdf-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: #1a5276; color: #fff;
    border: none; border-radius: 6px; padding: 0.55em 1.3em;
    font-size: 1em; font-weight: 600; cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.wcpdf-btn:hover:not(:disabled) { background: #154360; }
.wcpdf-btn:active:not(:disabled) { transform: scale(0.98); }
.wcpdf-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Spinner ── */
.wcpdf-spinner {
    display: inline-block; width: 18px; height: 18px;
    border: 3px solid #ccc; border-top-color: #1a5276;
    border-radius: 50%; animation: wcpdf-spin 0.7s linear infinite;
}
@keyframes wcpdf-spin { to { transform: rotate(360deg); } }

/* ── Mensajes ── */
.wcpdf-msg { font-size: 0.88em; padding: 0.4em 0.7em; border-radius: 4px; }
.wcpdf-msg-ok    { background: #eafaf1; color: #1e8449; border: 1px solid #a9dfbf; }
.wcpdf-msg-error { background: #fdedec; color: #922b21; border: 1px solid #f1948a; }
.wcpdf-msg-warn  { background: #fef9e7; color: #9a7d0a; border: 1px solid #f9e79f; }
.wcpdf-msg-info  { background: #eaf2ff; color: #1a5276; border: 1px solid #aed6f1; }

@media (max-width: 480px) {
    .wcpdf-cat-col { flex: 1 1 100%; }
    .wcpdf-pvp-row { flex-direction: column; align-items: flex-start; }
}

