/**
 * sellfast-addons.css
 * Estilos autocontenidos para Sellfast, BigSale y complementos en Landings.
 * Sigue la arquitectura de App Blocks de Shopify: Scoped CSS Reset + Theme Skins.
 */

/* ==========================================================================
   1. Scoped CSS Reset para Modales (#sellfastModal, #offerModal)
   ========================================================================== */
#sellfastModal,
#offerModal {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    font-size: 1rem;
    color: #212529;
    z-index: 1055;
}

#sellfastModal *,
#offerModal * {
    box-sizing: border-box;
}

#sellfastModal .modal-dialog,
#offerModal .modal-dialog {
    margin: 1.75rem auto;
    max-width: 500px;
}

@media (max-width: 576px) {
    #sellfastModal .modal-dialog,
    #offerModal .modal-dialog {
        margin: 0.5rem;
        max-width: none;
    }
}

#sellfastModal .modal-content,
#offerModal .modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#sellfastModal .modal-header,
#offerModal .modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
    align-items: center;
}

#sellfastModal .modal-body,
#offerModal .modal-body {
    padding: 1.25rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

#sellfastModal .modal-title,
#offerModal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* ==========================================================================
   2. Skins de Tema (Tokens Dark / Light)
   ========================================================================== */

/* Tema Oscuro (Vertex, Nova, Pulse, Onyx, etc.) */
#sellfastModal.theme-dark .modal-content,
#offerModal.theme-dark .modal-content {
    background-color: #212224;
    color: #ffffff;
}

#sellfastModal.theme-dark .modal-header,
#offerModal.theme-dark .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

#sellfastModal.theme-dark .modal-title,
#offerModal.theme-dark .modal-title,
#sellfastModal.theme-dark h2,
#offerModal.theme-dark h2,
#sellfastModal.theme-dark h3,
#offerModal.theme-dark h3,
#sellfastModal.theme-dark h4,
#offerModal.theme-dark h4 {
    color: #ffffff !important;
}

#sellfastModal.theme-dark .btn-close,
#offerModal.theme-dark .btn-close {
    filter: invert(100%);
    opacity: 0.8;
}

#sellfastModal.theme-dark .btn-close:hover,
#offerModal.theme-dark .btn-close:hover {
    opacity: 1;
}

#sellfastModal.theme-dark hr,
#offerModal.theme-dark hr {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Variante Pulse (Negro absoluto) */
#sellfastModal.theme-pulse .modal-content,
#offerModal.theme-pulse .modal-content {
    background-color: #000000;
}

/* Tema Claro (Radiance, Sun, Titan, Spectra, etc.) */
#sellfastModal.theme-light .modal-content,
#offerModal.theme-light .modal-content {
    background-color: #ffffff;
    color: #212529;
}

/* ==========================================================================
   3. Inputs y Controles de Formulario
   ========================================================================== */
#sellfastModal input.form-control,
#offerModal input.form-control {
    font-size: 0.95rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    line-height: 1.5;
}

#sellfastModal select.form-select,
#offerModal select.form-select {
    font-size: 0.95rem;
    padding: 0.55rem 2.25rem 0.55rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    line-height: 1.5;
    background-position: right 0.75rem center;
}

#sellfastModal.theme-dark input.form-control,
#offerModal.theme-dark input.form-control {
    background-color: #2c2d30;
    border-color: #404246;
    color: #ffffff;
}

#sellfastModal.theme-dark select.form-select,
#offerModal.theme-dark select.form-select {
    background-color: #2c2d30;
    border-color: #404246;
    color: #ffffff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

#sellfastModal.theme-dark input.form-control:focus,
#sellfastModal.theme-dark select.form-select:focus,
#offerModal.theme-dark input.form-control:focus,
#offerModal.theme-dark select.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    background-color: #2c2d30;
    color: #ffffff;
}

#sellfastModal.theme-dark input.form-control::placeholder,
#offerModal.theme-dark input.form-control::placeholder {
    color: #9da3a8;
}

/* ==========================================================================
   4. BigSale Modo 1: Escalas de Descuento por Cantidad (Volume Discounts)
   ========================================================================== */
#sellfastModal .cursor-pointer {
    cursor: pointer;
}

#sellfastModal .border-secondary {
    border-color: #6c757d !important;
}

#sellfastModal .border-success {
    border-color: #198754 !important;
}

#sellfastModal .bg-success.bg-opacity-10 {
    background-color: rgba(25, 135, 84, 0.12) !important;
}

#sellfastModal .border-danger {
    border-color: #dc3545 !important;
}

#sellfastModal .bg-danger.bg-opacity-10 {
    background-color: rgba(220, 53, 69, 0.12) !important;
}

#sellfastModal .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    font-weight: 600;
}

#sellfastModal del {
    color: #6c757d;
}

#sellfastModal.theme-dark del {
    color: #adb5bd;
}

/* ==========================================================================
   5. BigSale Modo 2: Oferta Cruzada / Upsell (#offerModal)
   ========================================================================== */
#offerModal .ratio-1x1 {
    border-radius: 0.375rem;
    overflow: hidden;
}

#offerModal .bg-warning {
    background-color: #ffc107 !important;
    border-radius: 0.375rem;
}

#offerModal #btn-big-sale .btn-success {
    font-weight: 600;
    padding: 0.75rem;
}

#offerModal #btn-big-sale .btn-outline-danger {
    font-weight: 500;
    padding: 0.5rem;
}

/* ==========================================================================
   6. Métodos de Pago y Variaciones
   ========================================================================== */
#sellfastModal .border-dashed {
    border: 1px dashed #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

#sellfastModal.theme-dark .border-dashed {
    border-color: #495057;
}

#sellfastModal .payment_method.active {
    border-color: #198754 !important;
    background-color: rgba(25, 135, 84, 0.06);
}

#sellfastModal.theme-dark .payment_method.active {
    border-color: #20c997 !important;
    background-color: rgba(32, 201, 151, 0.12);
}

#sellfastModal .logo-white {
    filter: brightness(0) invert(1);
}

#sellfastModal .text-golden {
    color: #d4af37;
}

#sellfastModal .btn-success {
    background-color: #198754;
    border-color: #198754;
    font-weight: 600;
}

#sellfastModal .btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

/* ==========================================================================
   7. Complementos Globales: WhatsApp Flotante y Toasts
   ========================================================================== */
.whatsapp-float-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1040;
    transition: transform 0.2s ease;
}
.whatsapp-float-btn:hover {
    transform: scale(1.08);
}
