/* ============================================================
   ASSORTIO FRONTEND – GLOBAL STYLES (Shared by Wizard + Builder)
============================================================ */

:root {
    --assortio-primary: #ff914d;
    --assortio-primary-hover: #e17f3f;

    --assortio-text: #222;
    --assortio-text-light: #555;

    --assortio-white: #fff;
    --assortio-bg: #f5f6f8;

    --assortio-border: #ddd;

    --assortio-radius: 10px;
}

/* Reset */
.assortio-reset * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Generic buttons */
.assortio-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: var(--assortio-radius);
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s ease;
    border: none;
    text-align: center;
}

.assortio-btn-primary {
    background: var(--assortio-primary);
    color: var(--assortio-white);
}

.assortio-btn-primary:hover {
    background: var(--assortio-primary-hover);
}

.assortio-btn-light {
    background: #f0f0f0;
    color: var(--assortio-text);
}

/* Shared container */
.assortio-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Smooth accordion animation */
.assortio-accordion-body {
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease;
    opacity: 0;
    max-height: 0;
}

.assortio-accordion.open .assortio-accordion-body {
    opacity: 1;
    max-height: 900px;
}

/* Images */
.assortio-lazy-img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.assortio-lazy-img.loaded {
    opacity: 1;
}

/* Mobile */
@media (max-width: 480px) {
    .assortio-btn {
        width: 100%;
    }
}

/* ================= Assortio FAB (floating button) ================= */

/* Base FAB – force it to be fixed to viewport */
button.assortio-fab,
a.assortio-fab,
#assortio-fab {
    position: fixed !important;
    bottom: var(--assortio-fab-offset-y, 24px) !important;
    right: var(--assortio-fab-offset-x, 24px) !important;
    left: auto !important;

    padding: 10px 22px;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    z-index: 999999 !important;

    color: #ffffff;
    background: var(--assortio-primary, #ff914d);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
    text-decoration: none;
}

/* Position helpers controlled by assortio_fab_position */
button.assortio-fab.assortio-fab-right,
a.assortio-fab.assortio-fab-right,
#assortio-fab.assortio-fab-right {
    right: var(--assortio-fab-offset-x, 24px) !important;
    left: auto !important;
}

button.assortio-fab.assortio-fab-left,
a.assortio-fab.assortio-fab-left,
#assortio-fab.assortio-fab-left {
    left: var(--assortio-fab-offset-x, 24px) !important;
    right: auto !important;
}

/* RTL support */
body.rtl button.assortio-fab.assortio-fab-right,
body.rtl a.assortio-fab.assortio-fab-right,
body.rtl #assortio-fab.assortio-fab-right {
    left: var(--assortio-fab-offset-x, 24px) !important;
    right: auto !important;
}

body.rtl button.assortio-fab.assortio-fab-left,
body.rtl a.assortio-fab.assortio-fab-left,
body.rtl #assortio-fab.assortio-fab-left {
    right: var(--assortio-fab-offset-x, 24px) !important;
    left: auto !important;
}

/* When any overlay is open, prevent body scroll */
.assortio-no-scroll {
    overflow: hidden;
}



/* ============================================================
   ASSORTIO – MY BUNDLES (My Account tab)
   ============================================================ */

.assortio-my-bundles-wrapper {
    margin: 24px 0 32px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.assortio-my-bundles-title {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.assortio-my-bundles-empty {
    font-size: 14px;
    color: #6b7280;
}

/* Grid of bundle cards */
.assortio-bundles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* Individual card */
.assortio-bundle-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 14px 16px 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.assortio-bundle-card:hover {
    transform: translateY(-2px);
    border-color: #d1d5db;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.assortio-bundle-name {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.assortio-bundle-meta {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6b7280;
}

/* Action buttons row */
.assortio-bundle-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Buttons – align visually with builder CTAs */
.assortio-bundle-actions button {
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    font-size: 12px;
    padding: 6px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
}

/* Primary action – load in builder */
.assortio-bundle-actions .assortio-bundle-load {
    border-color: var(--assortio-primary, #ff914d);
    background: var(--assortio-primary, #ff914d);
    color: #ffffff;
}

.assortio-bundle-actions .assortio-bundle-load:hover {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

/* Secondary actions */
.assortio-bundle-actions .assortio-bundle-rename:hover,
.assortio-bundle-actions .assortio-bundle-delete:hover {
    border-color: var(--assortio-primary, #ff914d);
    background: rgba(255, 145, 77, 0.04);
    color: var(--assortio-primary, #ff914d);
}

/* Mobile tweaks */
@media (max-width: 600px) {
    .assortio-bundles-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* -------------------------------------------------
 * My Bundles – Delete button styling
 * ------------------------------------------------- */
.assortio-bundle-actions .assortio-bundle-delete.button {
    /* reset Woo / theme button look */
    border: none;
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;

    /* Assortio style */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.2;

    background-color: #f04426;
    color: #ffffff;
}

.assortio-bundle-actions .assortio-bundle-delete.button:hover,
.assortio-bundle-actions .assortio-bundle-delete.button:focus {
    background-color: #d53a1f;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    outline: none;
}

.assortio-bundle-actions .assortio-bundle-delete.button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16);
}
