/**
 * SuperPyme Checkout Blocks - Shipping Styles
 * Shipping methods, modals, time messages, branch selection
 */

/* ============================================
   RESUMEN DEL PEDIDO (SIDEBAR)
   ============================================ */
body.woocommerce-checkout .wc-block-components-sidebar {
    background: #fff;
    border: 1px solid var(--spcb-border);
    border-radius: var(--spcb-radius);
    padding: 24px;
}

body.woocommerce-checkout .wc-block-components-order-summary__button {
    font-size: 18px;
    font-weight: 600;
}

/* ============================================
   OPCIONES DE ENVIO Y PAGO - RADIO BUTTONS
   v1.1.41 - Sin padding, solo borde visual
   ============================================ */

/* Solo borde y fondo - SIN padding para no afectar layout interno */
body.woocommerce-checkout .wc-block-components-radio-control__option {
    border: 1px solid var(--spcb-border) !important;
    border-radius: var(--spcb-radius) !important;
    margin-bottom: 8px !important;
    background: #fff !important;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
}

/* Hover SUTIL en opciones de envío y pago - v1.8.51 basado en accent color */
body.woocommerce-checkout .wc-block-components-radio-control__option:not(.wc-block-components-radio-control__option-checked):hover {
    border-color: #66b3a0 !important;
    background: var(--spcb-accent-hover-light) !important;
}

@supports (background: color-mix(in srgb, red 50%, blue)) {
    body.woocommerce-checkout .wc-block-components-radio-control__option:not(.wc-block-components-radio-control__option-checked):hover {
        border-color: color-mix(in srgb, var(--spcb-accent, #008060) 50%, #ccc) !important;
        background: color-mix(in srgb, var(--spcb-accent, #008060) 3%, white) !important;
    }
}

body.woocommerce-checkout .wc-block-components-radio-control__option-checked {
    border-color: var(--spcb-accent) !important;
    background: var(--spcb-accent-light) !important;
}

/* Padding para descripciones expandibles (métodos de pago, envío) */
/* v1.9.27/v1.9.30 - Fix para plugins legacy como Transbank que no tienen estilos propios */
body.woocommerce-checkout .wc-block-components-radio-control-accordion-content {
    padding: 12px 16px 16px 16px !important;
}

/* ============================================
   METODO DE ENTREGA (Enviar / Retiro en tienda)
   Botones más grandes y visibles
   ============================================ */

/* Contenedor de opciones */
body.woocommerce-checkout .wc-block-checkout__shipping-method-container {
    display: flex;
    gap: 12px;
}

/* Cada opción de entrega */
body.woocommerce-checkout .wc-block-checkout__shipping-method-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 10px !important;
    min-height: 70px;
    border: 2px solid var(--spcb-border) !important;
    border-radius: var(--spcb-radius) !important;
    background: #fff !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.woocommerce-checkout .wc-block-checkout__shipping-method-option:not(.wc-block-checkout__shipping-method-option--selected):hover {
    border-color: #66b3a0 !important;
    background: var(--spcb-accent-hover-light) !important;
}

@supports (background: color-mix(in srgb, red 50%, blue)) {
    body.woocommerce-checkout .wc-block-checkout__shipping-method-option:not(.wc-block-checkout__shipping-method-option--selected):hover {
        border-color: color-mix(in srgb, var(--spcb-accent, #008060) 50%, #ccc) !important;
        background: color-mix(in srgb, var(--spcb-accent, #008060) 3%, white) !important;
    }
}

body.woocommerce-checkout .wc-block-checkout__shipping-method-option--selected {
    border-color: var(--spcb-accent) !important;
    background: var(--spcb-accent-light) !important;
    box-shadow: 0 0 0 1px var(--spcb-accent) !important;
}

/* Wrapper del título */
body.woocommerce-checkout .wc-block-checkout__shipping-method-option-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Icono SVG */
body.woocommerce-checkout .wc-block-checkout__shipping-method-option-icon {
    width: 28px !important;
    height: 28px !important;
    fill: var(--spcb-accent);
}

/* Título del método */
body.woocommerce-checkout .wc-block-checkout__shipping-method-option-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1f2937;
    text-align: center;
}

/* Responsive móvil */
@media (max-width: 600px) {
    body.woocommerce-checkout .wc-block-checkout__shipping-method-container {
        gap: 6px;
    }

    body.woocommerce-checkout .wc-block-checkout__shipping-method-option {
        padding: 10px 6px !important;
        min-height: 60px;
    }

    body.woocommerce-checkout .wc-block-checkout__shipping-method-option-icon {
        width: 24px !important;
        height: 24px !important;
    }

    body.woocommerce-checkout .wc-block-checkout__shipping-method-option-title {
        font-size: 13px !important;
        line-height: 1.2;
    }
}

/* ============================================
   MODAL DE SUCURSAL
   ============================================ */
/* Forzar ancho específico para modales de envío (override quantity-selector.css) */
#spcb-other-modal .spcb-modal-content,
#spcb-shipping-info-modal .spcb-modal-content {
    max-width: 485px;
}

/* Grid 2x2 para modal de sucursal (v1.7.3) */
.spcb-modal-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.spcb-modal-fields-grid .spcb-modal-field {
    margin-bottom: 0;
}

/* v1.16.5: Advertencia en modal de sucursal */
.spcb-branch-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: #92400E;
}

.spcb-branch-warning svg {
    flex-shrink: 0;
    color: #F59E0B;
    margin-top: 1px;
}

.spcb-branch-warning strong {
    font-weight: 600;
    color: #B45309;
}

/* ============================================
   "OTRO" (OTHER TRANSPORT) MODAL STYLES
   ============================================ */
.spcb-other-info-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #f0f6fc;
    border: 1px solid #c8d8e8;
    border-radius: 8px;
    margin-bottom: 16px;
}

.spcb-other-icon {
    flex-shrink: 0;
    color: #0066cc;
}

.spcb-other-icon svg {
    width: 24px;
    height: 24px;
}

.spcb-other-message {
    flex: 1;
    font-size: 14px;
    color: #1d2327;
    line-height: 1.5;
}

.spcb-other-message p {
    margin: 0 0 8px 0;
}

.spcb-other-message p:last-child {
    margin-bottom: 0;
}

.spcb-other-phone {
    margin-bottom: 16px;
}

.spcb-whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #25D366;
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s ease;
}

.spcb-whatsapp-link:hover {
    background: #1ebe5b;
    color: #fff !important;
}

.spcb-whatsapp-link svg {
    flex-shrink: 0;
}

.spcb-field-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

/* Validation warning in modals */
.spcb-validation-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    margin-bottom: 16px;
}

.spcb-warning-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.spcb-warning-text {
    font-size: 14px;
    color: #856404;
    line-height: 1.4;
    font-weight: 500;
}

/* ============================================
   RESUMEN DE SUCURSAL + BOTÓN EDITAR
   ============================================ */
.spcb-branch-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.spcb-branch-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.spcb-branch-icon {
    font-size: 16px;
    line-height: 1.4;
    flex-shrink: 0;
}

.spcb-branch-details {
    font-size: 13px;
    color: #495057;
    line-height: 1.4;
}

.spcb-branch-details small {
    color: #6c757d;
}

.spcb-branch-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--spcb-accent, #007cba);
    background: #fff;
    border: 1px solid var(--spcb-accent, #007cba);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.spcb-branch-edit:hover {
    background: var(--spcb-accent, #007cba);
    color: #fff;
}

.spcb-branch-edit svg {
    flex-shrink: 0;
}

/* Responsive: stack on mobile */
@media (max-width: 480px) {
    .spcb-branch-summary {
        flex-direction: column;
        gap: 8px;
    }

    .spcb-branch-edit {
        align-self: flex-start;
    }

    /* Grid de modal a 1 columna en móviles */
    .spcb-modal-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* Summary content (used by branch and other summaries) */
.spcb-summary-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.spcb-summary-icon {
    font-size: 16px;
    line-height: 1.4;
    flex-shrink: 0;
}

.spcb-summary-text {
    font-size: 13px;
    color: #495057;
    line-height: 1.4;
}

.spcb-summary-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--spcb-accent, #007cba);
    background: #fff;
    border: 1px solid var(--spcb-accent, #007cba);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.spcb-summary-edit:hover {
    background: var(--spcb-accent, #007cba);
    color: #fff;
}

.spcb-summary-edit svg {
    flex-shrink: 0;
}

/* ============================================
   SHIPPING TIME MESSAGES
   ============================================ */
.spcb-shipping-time-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0 15px;
    padding: 10px 12px;
    background: #f0f9ff;
    border-radius: 6px;
    border: 1px solid #bae6fd;
    font-size: 13px;
    color: #0369a1;
}

.spcb-time-icon {
    flex-shrink: 0;
    color: #0284c7;
    margin-top: 1px;
}

.spcb-time-icon svg {
    display: block;
}

.spcb-time-text {
    line-height: 1.4;
}

/* Time message in branch modal */
.spcb-modal-time-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 15px;
    padding: 10px 12px;
    background: #fef3c7;
    border-radius: 6px;
    border: 1px solid #fcd34d;
    font-size: 13px;
    color: #92400e;
}

.spcb-modal-time-message .spcb-time-icon {
    color: #d97706;
}

@media (max-width: 600px) {
    .spcb-shipping-time-message,
    .spcb-modal-time-message {
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* ============================================
   BRANCH PREFILL NOTICE (auto-fill from shipping)
   ============================================ */
.spcb-branch-prefill-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 15px;
    padding: 10px 12px;
    background: #ecfdf5;
    border-radius: 6px;
    border: 1px solid #a7f3d0;
    font-size: 13px;
    color: #047857;
    animation: spcb-prefill-fade-in 0.3s ease;
}

.spcb-branch-prefill-notice .spcb-prefill-icon {
    flex-shrink: 0;
    color: #10b981;
}

.spcb-branch-prefill-notice .spcb-prefill-icon svg {
    display: block;
}

.spcb-branch-prefill-notice .spcb-prefill-text {
    flex: 1;
    line-height: 1.4;
}

.spcb-branch-prefill-notice .spcb-prefill-dismiss {
    background: none;
    border: none;
    padding: 0;
    width: 20px;
    height: 20px;
    font-size: 18px;
    line-height: 1;
    color: #6ee7b7;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.spcb-branch-prefill-notice .spcb-prefill-dismiss:hover {
    opacity: 1;
}

.spcb-branch-prefill-notice.spcb-prefill-notice-hiding {
    animation: spcb-prefill-fade-out 0.3s ease forwards;
}

@keyframes spcb-prefill-fade-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spcb-prefill-fade-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-5px);
    }
}

@media (max-width: 600px) {
    .spcb-branch-prefill-notice {
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* ============================================
   SHIPPING INFO HINTS + MODAL
   ============================================ */

/* Hint text below shipping method selector */
.spcb-shipping-info-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 0 4px;
    font-size: 12px;
    color: var(--spcb-text-muted, #666666);
}

/* Ocultar SVG original y usar pseudo-elemento estilizado */
.spcb-shipping-info-hint .spcb-info-icon {
    display: none !important;
}

/* Círculo azul con signo de exclamación blanco */
.spcb-shipping-info-hint::before {
    content: '!';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: #3b82f6; /* Azul vibrante */
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    line-height: 1;
}

.spcb-shipping-info-hint .spcb-info-text {
    flex: 1;
}

.spcb-shipping-info-hint .spcb-info-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--spcb-accent, #008060);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.spcb-shipping-info-hint .spcb-info-link:hover {
    color: var(--spcb-accent-hover, #006e52);
    text-decoration: underline;
}

/* Info modal content */
.spcb-info-modal-content {
    max-width: 485px;
}

.spcb-info-modal-content .spcb-modal-body {
    padding: 20px 24px;
}

.spcb-info-section {
    margin-bottom: 16px;
}

.spcb-info-section:last-child {
    margin-bottom: 0;
}

.spcb-info-section h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.spcb-info-section p {
    margin: 0 0 6px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #4b5563;
}

.spcb-info-section p:last-child {
    margin-bottom: 0;
}

.spcb-info-section strong {
    font-weight: 600;
    color: #1f2937;
}

/* Warning section (for pickup important notice) */
.spcb-info-section.spcb-info-warning {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 12px 14px;
}

.spcb-info-section.spcb-info-warning h4 {
    color: #92400e;
}

.spcb-info-section.spcb-info-warning p {
    color: #78350f;
}

/* Single confirm button (full width) */
.spcb-info-modal-content .spcb-modal-footer {
    justify-content: center;
}

.spcb-info-modal-content .spcb-info-modal-ok {
    flex: none;
    min-width: 160px;
}

/* Shared checkout confirmation modal */
#spcb-checkout-confirmation-modal .spcb-modal-overlay {
    background: rgba(0, 0, 0, 0.6);
}

#spcb-checkout-confirmation-modal .spcb-modal-content {
    max-width: 500px;
    width: min(500px, calc(100% - 32px));
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

.spcb-checkout-confirm-body {
    padding: 32px 32px 20px;
    text-align: center;
}

.spcb-checkout-confirm-icon-shell {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spcb-checkout-confirm-icon-shell svg {
    width: 42px !important;
    height: 42px !important;
    stroke-width: 1.6;
}

.spcb-checkout-confirm-title {
    margin: 0 0 16px;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
    color: #1f2937;
}

.spcb-checkout-confirm-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spcb-checkout-confirm-copy p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #4b5563;
}

.spcb-checkout-confirm-location {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 2px 0 8px;
    padding: 12px 14px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a8a;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    overflow: hidden;
    text-align: left;
}

.spcb-checkout-confirm-location-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #dbeafe;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
}

.spcb-checkout-confirm-location-icon svg {
    width: 16px !important;
    height: 16px !important;
    stroke-width: 2;
}

.spcb-checkout-confirm-location-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spcb-checkout-confirm-location-label {
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #2563eb;
}

.spcb-checkout-confirm-location-name {
    font-size: 15px;
    line-height: 1.35;
    color: #1f2937;
    overflow-wrap: anywhere;
}

.spcb-checkout-confirm-location-address {
    font-size: 13px;
    line-height: 1.45;
    color: #4b5563;
    overflow-wrap: anywhere;
}

.spcb-checkout-confirm-rut {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 2px 0;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    overflow: hidden;
    text-align: center;
}

.spcb-checkout-confirm-rut-label {
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #6b7280;
}

.spcb-checkout-confirm-rut-value {
    font-size: 17px;
    line-height: 1.35;
    color: #1f2937;
    overflow-wrap: anywhere;
}

.spcb-checkout-confirm-copy .spcb-checkout-confirm-question {
    color: #1f2937;
    font-weight: 500;
}

.spcb-checkout-confirm-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.spcb-checkout-confirm-section {
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.spcb-checkout-confirm-section h4 {
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.spcb-checkout-confirm-section-copy p {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
}

.spcb-checkout-confirm-section-copy p:last-child {
    margin-bottom: 0;
}

.spcb-checkout-confirm-section strong {
    color: #1f2937;
}

.spcb-checkout-confirm-section--warning {
    background: #fef3c7;
    border-color: #fcd34d;
}

.spcb-checkout-confirm-section--warning h4 {
    color: #92400e;
}

.spcb-checkout-confirm-section--warning .spcb-checkout-confirm-section-copy p {
    color: #78350f;
}

#spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    padding: 24px 28px 16px;
    text-align: left;
}

#spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-icon-shell {
    width: 46px;
    height: 46px;
    margin: 0;
    grid-column: 1;
    grid-row: 1;
}

#spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-icon-shell svg {
    width: 26px !important;
    height: 26px !important;
}

#spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-title {
    min-width: 0;
    margin: 0;
    grid-column: 2;
    grid-row: 1;
    font-size: 20px;
}

#spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-copy {
    grid-column: 1 / -1;
    margin-top: 14px;
}

#spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-copy p {
    font-size: 14px;
    line-height: 1.5;
}

#spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-sections {
    grid-column: 1 / -1;
    gap: 12px;
    margin-top: 16px;
}

#spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-section {
    padding: 14px 16px;
    border-radius: 12px;
    text-align: left;
}

#spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-section h4 {
    justify-content: flex-start;
    margin-bottom: 7px;
    font-size: 15px;
}

#spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-section-copy p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 6px;
}

#spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-actions {
    gap: 10px;
    padding: 0 28px 24px;
}

.spcb-checkout-confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 32px 32px;
    border-top: none;
    background: #fff;
}

.spcb-checkout-confirm-action {
    width: 100%;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spcb-checkout-confirm-action--primary {
    border: none;
    background: var(--spcb-accent, #008060);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}

.spcb-checkout-confirm-action--primary:hover {
    background: var(--spcb-accent-hover, #006e52);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.spcb-checkout-confirm-action--secondary {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
}

.spcb-checkout-confirm-action--secondary:hover {
    background: #f3f4f6;
    color: #1f2937;
    border-color: #d1d5db;
}

@media (max-width: 600px) {
    .spcb-shipping-info-hint {
        flex-wrap: wrap;
        gap: 4px;
        font-size: 11px;
    }

    .spcb-shipping-info-hint .spcb-info-link {
        font-size: 11px;
    }

    .spcb-info-modal-content {
        max-width: 95%;
    }

    .spcb-info-modal-content .spcb-modal-body {
        padding: 16px 18px;
    }

    .spcb-info-section h4 {
        font-size: 13px;
    }

    .spcb-info-section p {
        font-size: 12px;
    }

    #spcb-checkout-confirmation-modal .spcb-modal-content {
        width: calc(100% - 24px);
    }

    .spcb-checkout-confirm-body {
        padding: 24px 20px 16px;
    }

    .spcb-checkout-confirm-icon-shell {
        width: 64px;
        height: 64px;
        margin-bottom: 16px;
    }

    .spcb-checkout-confirm-icon-shell svg {
        width: 38px !important;
        height: 38px !important;
    }

    .spcb-checkout-confirm-title {
        font-size: 20px;
    }

    .spcb-checkout-confirm-copy p,
    .spcb-checkout-confirm-section-copy p {
        font-size: 14px;
    }

    .spcb-checkout-confirm-location {
        padding: 11px 12px;
        gap: 9px;
    }

    .spcb-checkout-confirm-location-name {
        font-size: 14px;
    }

    .spcb-checkout-confirm-location-address {
        font-size: 12px;
    }

    .spcb-checkout-confirm-section h4 {
        font-size: 15px;
    }

    #spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-body {
        column-gap: 10px;
        padding: 20px 18px 14px;
    }

    #spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-icon-shell {
        width: 40px;
        height: 40px;
    }

    #spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-icon-shell svg {
        width: 23px !important;
        height: 23px !important;
    }

    #spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-title {
        font-size: 18px;
        line-height: 1.25;
    }

    #spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-copy {
        margin-top: 12px;
    }

    #spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-location {
        margin-bottom: 6px;
        padding: 10px 11px;
        gap: 8px;
    }

    #spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-sections {
        gap: 10px;
        margin-top: 12px;
    }

    #spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-section {
        padding: 13px 14px;
    }

    #spcb-checkout-confirmation-modal[data-spcb-modal-id="pickup-checkout-confirmation"] .spcb-checkout-confirm-actions {
        padding: 0 18px 20px;
    }

    .spcb-checkout-confirm-actions {
        padding: 0 20px 24px;
    }
}

/* ============================================
   BRANCH CHECKBOX INLINE (v1.17.0)
   Reemplaza el modal de sucursal con checkbox
   ============================================ */

/* Container del checkbox */
.spcb-branch-checkbox-container {
    margin: 16px 0 8px;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.spcb-branch-checkbox-container:has(input:checked) {
    border-color: var(--spcb-accent, #008060);
    background: var(--spcb-accent-light, #f0fdf4);
}

.spcb-branch-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.spcb-branch-checkbox-input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--spcb-accent, #008060);
}

.spcb-branch-checkbox-text strong {
    display: block;
    margin-bottom: 4px;
    color: #1f2937;
}

.spcb-branch-checkbox-text span {
    color: #666;
}

/* Campo de referencia para sucursal - FUERA del form para no afectar grid */
.spcb-reference-field-container {
    margin-top: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Input del campo de referencia */
.spcb-reference-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 20px 16px 12px 16px;
    font-size: 16px;
    line-height: 1.375;
    border: 1px solid #8c8c8c;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.15s ease;
    height: auto;
    min-height: 56px;
}

.spcb-reference-input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
}

/* Label flotante del campo de referencia */
.spcb-reference-label {
    position: absolute;
    left: 16px;
    top: 16px; /* Centrado visualmente en el input */
    font-size: 16px;
    color: #757575;
    pointer-events: none;
    transition: all 0.15s ease;
    background: transparent;
    line-height: 1.5;
}

/* Cuando hay foco o tiene valor - label sube */
.spcb-reference-field-container.is-active .spcb-reference-label,
.spcb-reference-input:focus + .spcb-reference-label,
.spcb-reference-input:not(:placeholder-shown) + .spcb-reference-label {
    top: 6px;
    font-size: 12px;
    color: #333;
    line-height: 1;
}

/* Descripción del campo */
.spcb-reference-field-container .spcb-field-description {
    display: block;
    font-size: 12px;
    color: #666;
    margin: 8px 0 0 0;
}

.spcb-reference-field-container.has-error .spcb-reference-input {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px #dc2626 !important;
}

.spcb-reference-field-container.has-error .spcb-reference-label {
    color: #dc2626 !important;
}

/* Ocultar iconos de extensiones (LastPass, etc) que causan overflow */
.spcb-reference-field-container [data-lastpass-icon-root] {
    display: none !important;
}

/* ============================================
   OCULTACIÓN DE CAMPOS EN MODO SUCURSAL
   Cuando checkbox "Envío a sucursal" está marcado
   ============================================ */

/* Ocultar campos en modo sucursal (solo mostrar: Región, Comuna, Calle referencia) */
body.spcb-branch-mode #shipping-fields .wc-block-components-address-form__country,
body.spcb-branch-mode #shipping-fields .wc-block-components-address-form__first_name,
body.spcb-branch-mode #shipping-fields .wc-block-components-address-form__last_name,
body.spcb-branch-mode #shipping-fields .wc-block-components-address-form__company,
body.spcb-branch-mode #shipping-fields .wc-block-components-address-form__address_1,
body.spcb-branch-mode #shipping-fields .wc-block-components-address-form__address_2,
body.spcb-branch-mode #shipping-fields .wc-block-components-address-form__phone,
body.spcb-branch-mode #shipping-fields .spcb-phone-shadow,
body.spcb-branch-mode #shipping-fields .wc-block-components-address-form__address_2-toggle {
    display: none !important;
}

/* Fallback más agresivo para el toggle de address_2 */
/* El toggle puede estar fuera del #shipping-fields en algunas versiones de WC Blocks */
body.spcb-branch-mode .wc-block-components-address-form__address_2-toggle {
    display: none !important;
}

/* Selector alternativo por atributo parcial */
body.spcb-branch-mode [class*="address_2-toggle"] {
    display: none !important;
}

/* Selector específico para WC Blocks checkout shipping fields wrapper */
body.spcb-branch-mode .wc-block-checkout__shipping-fields .wc-block-components-address-form__address_2-toggle {
    display: none !important;
}

/* Mantener visibles en modo sucursal: Región, Comuna y Calle de referencia */
body.spcb-branch-mode #shipping-fields .wc-block-components-address-form__state,
body.spcb-branch-mode #shipping-fields .wc-block-components-address-form__city,
body.spcb-branch-mode #shipping-fields .spcb-reference-field-container {
    display: block !important;
}

/* Animación suave para mostrar/ocultar campos */
#shipping-fields .wc-block-components-address-form__address_1,
#shipping-fields .wc-block-components-address-form__address_2,
#shipping-fields .wc-block-components-address-form__company {
    transition: opacity 0.2s ease, max-height 0.2s ease;
}

/* Responsive para checkbox */
@media (max-width: 600px) {
    .spcb-branch-checkbox-container {
        padding: 12px;
        margin: 12px 0 6px;
    }

    .spcb-branch-checkbox-label {
        gap: 10px;
        font-size: 13px;
    }

    .spcb-branch-checkbox-input {
        width: 18px;
        height: 18px;
    }

    .spcb-branch-checkbox-text strong {
        font-size: 13px;
    }
}
