/* ==========================================================================
   WC Location Shipping Estimator – Estilos
   ========================================================================== */

:root {
    --wcls-accent:      #2563eb;
    --wcls-accent-dark: #1d4ed8;
    --wcls-radius:      12px;
    --wcls-shadow:      0 20px 60px rgba(0, 0, 0, 0.18);
    --wcls-transition:  0.25s ease;
    --wcls-font:        inherit;
}

/* --------------------------------------------------------------------------
   Overlay
   -------------------------------------------------------------------------- */
.wcls-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;

    opacity: 0;
    visibility: hidden;
    transition: opacity var(--wcls-transition), visibility var(--wcls-transition);
}

.wcls-overlay--visible {
    opacity: 1;
    visibility: visible;
}

.wcls-no-scroll {
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Popup
   -------------------------------------------------------------------------- */
.wcls-popup {
    background: #fff;
    border-radius: var(--wcls-radius);
    box-shadow: var(--wcls-shadow);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    font-family: var(--wcls-font);

    transform: translateY(20px) scale(0.97);
    transition: transform var(--wcls-transition);
}

.wcls-overlay--visible .wcls-popup {
    transform: translateY(0) scale(1);
}

.wcls-popup__header {
    background: linear-gradient(135deg, var(--wcls-accent) 0%, var(--wcls-accent-dark) 100%);
    color: #fff;
    padding: 28px 28px 24px;
    text-align: center;
}

.wcls-popup__icon {
    font-size: 36px;
    margin-bottom: 10px;
    line-height: 1;
}

.wcls-popup__title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.wcls-popup__subtitle {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.88;
    line-height: 1.5;
    color: #fff;
}

/* --------------------------------------------------------------------------
   Cuerpo del popup
   -------------------------------------------------------------------------- */
.wcls-popup__body {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Campos */
.wcls-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wcls-field__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
}

.wcls-field__select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #111827;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: border-color var(--wcls-transition), box-shadow var(--wcls-transition);
    font-family: var(--wcls-font);
}

.wcls-field__select:focus {
    outline: none;
    border-color: var(--wcls-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.wcls-field__select:disabled {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Botones */
.wcls-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--wcls-transition), opacity var(--wcls-transition), transform 0.1s;
    font-family: var(--wcls-font);
    text-align: center;
}

.wcls-btn:active {
    transform: scale(0.98);
}

.wcls-btn--primary {
    background: var(--wcls-accent);
    color: #fff;
    margin-top: 4px;
}

.wcls-btn--primary:hover:not(:disabled) {
    background: var(--wcls-accent-dark);
}

.wcls-btn--primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.wcls-btn--ghost {
    background: transparent;
    color: #6b7280;
    font-weight: 400;
    font-size: 0.875rem;
    padding: 8px;
}

.wcls-btn--ghost:hover {
    color: #374151;
    background: #f3f4f6;
}

/* --------------------------------------------------------------------------
   Estimador en página de producto
   -------------------------------------------------------------------------- */
.wcls-estimator {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    transition: border-color var(--wcls-transition);
}

.wcls-estimator:hover {
    border-color: var(--wcls-accent);
}

.wcls-estimator__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wcls-estimator__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.wcls-estimator__content {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
    min-width: 0;
}

.wcls-estimator__label {
    font-size: 0.875rem;
    color: #6b7280;
    flex-shrink: 0;
}

.wcls-estimator__result {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
}

.wcls-estimator__result--loading,
.wcls-estimator__result--calculating {
    color: #9ca3af;
    font-weight: 400;
    font-style: italic;
}

.wcls-estimator__result--error,
.wcls-estimator__result--neutral {
    color: #6b7280;
    font-weight: 400;
    font-size: 0.875rem;
}

.wcls-estimator__result--free {
    color: #15803d;
}

/* --------------------------------------------------------------------------
   Banner promocional de envío gratis (sobre el estimador)
   -------------------------------------------------------------------------- */
.wcls-promo-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 6px;
    background: linear-gradient(90deg, #fefce8 0%, #fef9c3 100%);
    border: 1.5px dashed #fbbf24;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #92400e;
    line-height: 1.4;
}

.wcls-estimator__change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 4px 10px;
    background: transparent;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #6b7280;
    cursor: pointer;
    transition: all var(--wcls-transition);
    font-family: var(--wcls-font);
    flex-shrink: 0;
}

.wcls-estimator__change:hover {
    border-color: var(--wcls-accent);
    color: var(--wcls-accent);
    background: rgba(37, 99, 235, 0.04);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .wcls-popup__header {
        padding: 22px 20px 18px;
    }
    .wcls-popup__body {
        padding: 18px 20px 22px;
    }
    .wcls-estimator__inner {
        gap: 8px;
    }
}
