/* =================================================================
   SD Certificado Upsell — Modal Premium Design (MAX SPECIFICITY - NO ANIMATIONS)
   ================================================================= */

html body #sdcu-wrapper * {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    outline: none !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    box-shadow: none !important; /* Force remove all shadows */
}

html body #sdcu-wrapper {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important; /* Maximized to beat Woodmart's sidebar */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(15, 23, 42, 0.5) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    padding: 16px !important;
}

html body #sdcu-wrapper.sdcu-visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

html body #sdcu-wrapper .sdcu-modal {
    position: relative !important;
    width: 100% !important;
    max-width: 500px !important;
    background: #ffffff !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: 90vh !important;
    border: none !important;
}

/* ── Close Button ── */
html body #sdcu-wrapper button.sdcu-close {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 20 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
}

html body #sdcu-wrapper button.sdcu-close svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    fill: none !important;
    display: block !important;
}

html body #sdcu-wrapper button.sdcu-close:hover {
    background: #f8fafc !important;
    color: #0f172a !important;
}

/* ── Header ── */
html body #sdcu-wrapper .sdcu-header {
    position: relative !important;
    padding: 32px 24px 24px !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%) !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    display: block !important;
}

html body #sdcu-wrapper .sdcu-header-content {
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px !important;
    position: relative !important;
    z-index: 2 !important;
}

html body #sdcu-wrapper .sdcu-header-icon {
    flex-shrink: 0 !important;
    width: 52px !important;
    height: 52px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #10b981 !important;
    border: none !important;
}

html body #sdcu-wrapper .sdcu-header-icon svg {
    width: 28px !important;
    height: 28px !important;
    stroke: currentColor !important;
    fill: none !important;
    display: block !important;
}

html body #sdcu-wrapper .sdcu-header-text {
    flex: 1 !important;
    padding-right: 24px !important;
}

html body #sdcu-wrapper h3.sdcu-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 6px !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    background: none !important;
}

html body #sdcu-wrapper p.sdcu-subtitle {
    font-size: 14px !important;
    color: #475569 !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
}

/* ── List ── */
html body #sdcu-wrapper .sdcu-list {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 24px !important;
    background: #fafafa !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

html body #sdcu-wrapper .sdcu-list::-webkit-scrollbar {
    width: 6px !important;
}
html body #sdcu-wrapper .sdcu-list::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 6px !important;
}

/* ── Cards ── */
html body #sdcu-wrapper .sdcu-card {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 12px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    margin: 0 !important;
    flex-direction: row !important;
}

html body #sdcu-wrapper .sdcu-card:hover {
    border-color: #cbd5e1 !important;
}

html body #sdcu-wrapper .sdcu-card.sdcu-card-added {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    opacity: 0.8 !important;
}

html body #sdcu-wrapper .sdcu-card-img {
    width: 64px !important;
    height: 64px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #f1f5f9 !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    padding: 0 !important;
    margin: 0 !important;
}
html body #sdcu-wrapper .sdcu-card-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
}

html body #sdcu-wrapper .sdcu-card-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

html body #sdcu-wrapper span.sdcu-card-name {
    display: block !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
}

html body #sdcu-wrapper span.sdcu-card-specialty {
    display: block !important;
    font-size: 13px !important;
    color: #64748b !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
}

html body #sdcu-wrapper .sdcu-card-action {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

/* ── Price formatting ── */
html body #sdcu-wrapper .sdcu-card-price-html {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #00b853 !important; /* Stronger green */
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    line-height: 1.2 !important;
}

html body #sdcu-wrapper .sdcu-card-price-html del {
    font-size: 12px !important;
    color: #94a3b8 !important;
    text-decoration: line-through !important;
    font-weight: 500 !important;
    display: block !important;
}

html body #sdcu-wrapper .sdcu-card-price-html ins {
    text-decoration: none !important;
    color: #00b853 !important; /* Stronger green */
    background: transparent !important;
    display: block !important;
}

html body #sdcu-wrapper .sdcu-card-price-html .woocommerce-Price-currencySymbol {
    margin-right: 2px !important;
}
html body #sdcu-wrapper .sdcu-card-price-html .woocommerce-Price-amount {
    font-weight: 700 !important;
    color: inherit !important;
}

/* ── Card Button ── */
html body #sdcu-wrapper button.sdcu-card-btn {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: #2563eb !important; /* Solid blue */
    color: #ffffff !important;
    border: none !important;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    outline: none !important;
    min-width: 85px !important;
    text-align: center !important;
    line-height: 1 !important;
    display: inline-block !important;
    text-transform: none !important;
    margin: 0 !important;
    height: auto !important;
}

html body #sdcu-wrapper button.sdcu-card-btn:hover:not(:disabled) {
    background: #1d4ed8 !important; /* Darker blue */
}

html body #sdcu-wrapper button.sdcu-card-btn.sdcu-card-btn-added {
    background: #f0fdf4 !important;
    color: #16a34a !important;
    cursor: default !important;
}

html body #sdcu-wrapper button.sdcu-card-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

/* ── Footer ── */
html body #sdcu-wrapper .sdcu-footer {
    padding: 24px !important;
    background: #ffffff !important;
    border-top: 1px solid #f1f5f9 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
}

html body #sdcu-wrapper button.sdcu-btn-add-all {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 100% !important;
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    padding: 16px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    outline: none !important;
    text-transform: none !important;
    line-height: 1 !important;
    margin: 0 !important;
    height: auto !important;
}

html body #sdcu-wrapper button.sdcu-btn-add-all:hover:not(:disabled) {
    background: #1d4ed8 !important;
}

html body #sdcu-wrapper button.sdcu-btn-add-all:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
}

html body #sdcu-wrapper span.sdcu-total-badge {
    background: rgba(255, 255, 255, 0.2) !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    display: inline-block !important;
    line-height: 1 !important;
}

html body #sdcu-wrapper a.sdcu-btn-continue {
    text-align: center !important;
    color: #64748b !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

html body #sdcu-wrapper a.sdcu-btn-continue:hover {
    color: #0f172a !important;
}

html body #sdcu-wrapper a.sdcu-btn-continue::after {
    content: "→" !important;
    font-size: 16px !important;
    font-family: Arial, sans-serif !important;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    html body #sdcu-wrapper {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    html body #sdcu-wrapper .sdcu-modal {
        border-radius: 24px 24px 0 0 !important;
        max-height: 90vh !important;
    }

    html body #sdcu-wrapper .sdcu-header {
        padding: 24px 20px 20px !important;
    }

    html body #sdcu-wrapper .sdcu-list {
        padding: 16px 12px !important;
    }

    html body #sdcu-wrapper .sdcu-card {
        padding: 12px !important;
        gap: 12px !important;
    }

    html body #sdcu-wrapper .sdcu-card-img {
        width: 56px !important;
        height: 56px !important;
    }

    html body #sdcu-wrapper .sdcu-footer {
        padding: 20px !important;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    }
}
