/**
 * PG Order Bumps — Checkout Styles
 *
 * Uses theme CSS custom properties with fallbacks,
 * so this works even without the PlayGuitar theme.
 */

/* ─── Card Style (Default) ─── */

.pg-order-bump--card {
    background: #fff;
    border: 2px dashed #9ca3af;
    border-radius: var(--radius-lg, 12px);
    margin: 24px 0;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.pg-order-bump--card.pg-order-bump--active {
    border-color: var(--color-primary, #1a5276);
    border-style: solid;
}

/* ─── Tag / Badge ─── */

.pg-order-bump__tag {
    position: absolute;
    top: 0;
    right: 20px;
    background: var(--color-primary, #1a5276);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px 5px;
    border-radius: 0 0 6px 6px;
    line-height: 1.4;
}

/* Header row: arrow + checkbox + CTA */
.pg-order-bump__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #ffff99;
    border-bottom: 1px solid #e6e680;
}

/* Body: image + copy side by side */
.pg-order-bump__body {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.pg-order-bump__image {
    flex-shrink: 0;
    width: 100px;
}

.pg-order-bump__image img {
    width: 100px;
    height: auto;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--color-border, #e5e7eb);
}

.pg-order-bump__content {
    flex: 1;
    min-width: 0;
}

/* ─── Highlight Style ─── */

.pg-order-bump--highlight {
    background: #fff;
    border: 2px solid #f59e0b;
    border-radius: var(--radius-lg, 12px);
    margin: 24px 0;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.2s;
}

.pg-order-bump--highlight.pg-order-bump--active {
    box-shadow: 0 0 0 1px #f59e0b;
}

.pg-order-bump--highlight .pg-order-bump__header {
    background: #fef3c7;
    border-bottom-color: #fbbf24;
}

.pg-order-bump--highlight .pg-order-bump__body {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.pg-order-bump--highlight .pg-order-bump__tag {
    background: #f59e0b;
}

.pg-order-bump__badge {
    position: absolute;
    top: -11px;
    left: 20px;
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 10px;
    border-radius: 4px;
    line-height: 1.6;
}

/* ─── Minimal Style ─── */

.pg-order-bump--minimal {
    border-top: 1px solid var(--color-border, #e5e7eb);
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    padding: 16px 0;
    margin: 16px 0;
    position: relative;
}

/* ─── Shared Components ─── */

.pg-order-bump__label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.pg-order-bump__arrow {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.pg-order-bump__checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--color-primary, #1a5276);
    flex-shrink: 0;
    cursor: pointer;
}

.pg-order-bump__cta {
    font-weight: 700;
    font-size: 15px;
    color: var(--color-heading, #1a1a2e);
}

/* Price row — shown in body under headline */
.pg-order-bump__price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.pg-order-bump__headline {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary, #1a5276);
    margin: 0 0 6px;
    line-height: 1.4;
}

.pg-order-bump__tagline {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text, #374151);
    margin: 0 0 8px;
    line-height: 1.4;
}

.pg-order-bump__desc {
    font-size: 14px;
    color: var(--color-text-muted, #6b7280);
    line-height: 1.55;
    margin: 0;
}

.pg-order-bump__original-price {
    text-decoration: line-through;
    color: var(--color-text-muted, #6b7280);
    font-size: 14px;
}

.pg-order-bump__bump-price {
    font-weight: 700;
    color: var(--color-heading, #1a1a2e);
    font-size: 18px;
}

/* ─── Loading State ─── */

.pg-order-bump--loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.pg-order-bump--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 24px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border, #e5e7eb);
    border-top-color: var(--color-primary, #1a5276);
    border-radius: 50%;
    animation: pg-bump-spin 0.6s linear infinite;
}

@keyframes pg-bump-spin {
    to { transform: rotate(360deg); }
}

/* ─── Mobile ─── */

@media (max-width: 480px) {
    .pg-order-bump__header {
        padding: 12px 16px;
    }

    .pg-order-bump__body {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .pg-order-bump__image {
        width: 80px;
    }

    .pg-order-bump__image img {
        width: 80px;
    }

    .pg-order-bump__cta {
        font-size: 14px;
    }

    .pg-order-bump__bump-price {
        font-size: 16px;
    }

    .pg-order-bump__tag {
        right: 12px;
        font-size: 10px;
        padding: 3px 8px 4px;
    }
}
