/* LG Materiales — Calculador de envíos: interfaz compacta y progresiva */
.lg-zip-container {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 3px 14px rgba(17, 24, 39, .06);
    font-family: inherit;
}

.lg-zip-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.lg-zip-label { margin: 1px 0 3px !important; color: #111827; font-size: 1rem; font-weight: 750; line-height: 1.25; }
.lg-zip-help { margin: 0 !important; color: #6b7280; font-size: .78rem; line-height: 1.4; }
.lg-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; background: #c50707; color: #fff; font-size: .95rem; }

.lg-zip-form { display: flex; gap: 8px; }
.lg-zip-form input { flex: 1; min-width: 0; height: 44px !important; padding: 0 13px !important; border: 1.5px solid #d1d5db !important; border-radius: 8px !important; outline: 0 !important; color: #111827 !important; background: #fff !important; font-size: .92rem !important; transition: border-color .18s, box-shadow .18s; }
.lg-zip-form input:focus { border-color: #c50707 !important; box-shadow: 0 0 0 3px rgba(197, 7, 7, .1); }
.lg-zip-form button { height: 44px; padding: 0 18px !important; border: 0 !important; border-radius: 8px !important; background: #1a1a1a !important; color: #fff !important; cursor: pointer; font-size: .875rem !important; font-weight: 700 !important; white-space: nowrap; transition: background .18s, transform .18s; }
.lg-zip-form button:hover { background: #c50707 !important; }
.lg-zip-form button:active { transform: translateY(1px); }
.lg-zip-form button:disabled { cursor: wait; opacity: .7; }
.lg-postcode-error { margin: 7px 0 0 !important; color: #b42318; font-size: .75rem; }

#lg-zip-results { transition: opacity .2s ease; }
.lg-results-inner { margin-top: 18px; padding-top: 14px; border-top: 1px solid #f0f0f0; }
.lg-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.lg-zip-info { margin: 0 !important; padding: 4px 9px; border-radius: 99px; background: #f3f4f6; color: #6b7280; font-size: .75rem; }
.lg-zip-info strong { color: #374151; }
.lg-change-postcode { padding: 2px 0 !important; border: 0 !important; background: transparent !important; color: #8f0505 !important; cursor: pointer; font-size: .75rem !important; font-weight: 700 !important; text-decoration: underline; }

/* Cada categoría ocupa una sola fila hasta que el cliente decida verla. */
.lg-rate-group { margin: 0; border-top: 1px solid #edf0f2; }
.lg-rate-group:first-of-type { border-top: 0; }
.lg-group-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; list-style: none; cursor: pointer; color: #374151; }
.lg-group-header::-webkit-details-marker { display: none; }
.lg-group-header:focus-visible { outline: 2px solid #c50707; outline-offset: -3px; border-radius: 7px; }
.lg-group-title { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 700; }
.lg-group-icon { font-size: 1rem; }
.lg-group-summary { display: inline-flex; align-items: center; gap: 7px; color: #9ca3af; font-size: .72rem; white-space: nowrap; }
.lg-group-summary strong { color: #111827; font-size: .78rem; }
.lg-group-summary strong.is-free { padding: 3px 8px; border-radius: 20px; background: #dcfce7; color: #15803d; }
.lg-group-chevron { width: 7px; height: 7px; border-right: 1.5px solid #6b7280; border-bottom: 1.5px solid #6b7280; transform: rotate(45deg) translateY(-2px); transition: transform .18s; }
.lg-rate-group[open] .lg-group-chevron { transform: rotate(225deg) translate(-1px, -2px); }
.lg-rate-list { padding: 0 0 10px; }

.lg-rate-card { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 9px 11px; margin-bottom: 5px; border: 1px solid #e5e7eb; border-radius: 9px; background: #fff; }
.lg-rate-card:last-child { margin-bottom: 0; }
.lg-rate-card.is-cheapest { border-color: #a7f3c5; background: #f2fdf6; }
.lg-rate-card.is-free { border-color: #c8f4da; background: #f7fffa; }
.lg-rate-icon { width: 20px; flex: 0 0 20px; text-align: center; font-size: 1rem; }
.lg-rate-info { min-width: 0; flex: 1; }
.lg-rate-name { overflow: hidden; color: #1f2937; font-size: .82rem; font-weight: 600; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.lg-rate-meta { margin-top: 2px; color: #8b95a7; font-size: .7rem; line-height: 1.2; }
.lg-rate-price { color: #111827; font-size: .9rem; font-weight: 800; white-space: nowrap; }
.lg-rate-price.is-free { padding: 4px 8px; border-radius: 99px; background: #dcfce7; color: #15803d; font-size: .78rem; }
.lg-badge-best { padding: 3px 6px; border-radius: 99px; background: #dcfce7; color: #15803d; font-size: .58rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }

.lg-no-rates { margin: 14px 0 0 !important; padding: 12px 14px; border: 1px solid #fecaca; border-radius: 8px; background: #fef2f2; color: #991b1b; font-size: .84rem; line-height: 1.5; }
.lg-spinner { display: inline-block; width: 13px; height: 13px; margin-right: 5px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: lg-spin .7s linear infinite; vertical-align: -2px; }
@keyframes lg-spin { to { transform: rotate(360deg); } }

@media (max-width: 420px) {
    .lg-zip-container { padding: 16px; }
    .lg-rate-card { gap: 8px; padding: 9px; }
    .lg-badge-best { display: none; }
    .lg-group-summary { gap: 5px; }
}
