/* Purchase Offer Table block (blocks/purchase-offer-table) */
.purchase-offer-table-block {
    background-color: var(--bg-color, #001744);
    padding: 60px 20px;
}

.purchase-offer-table-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.potable-heading {
    margin: 0 0 28px;
    text-align: center;
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: -0.5px;
    background: linear-gradient(89.65deg, var(--color-yellow-light, #FEC20E) 28%, var(--color-orange, #FF7403) 97.28%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--color-yellow-light, #FEC20E); /* fallback for browsers without background-clip: text support */
}

.potable {
    border-radius: 15px;
    border: 1px solid #182D82;
    background: radial-gradient(74.83% 39.3% at 50% 2.27%, #001744 17.5%, #000C23 100%);
    padding: 8px 32px;
}

.potable-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.3fr;
    align-items: center;
    column-gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #182D82;
}

.potable-row:last-child {
    border-bottom: none;
}

.potable-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
}

.potable-cell-freespins {
    color: var(--text-white, #fff);
    font-weight: 700;
    font-size: 20px;
}

/* Header row */
.potable-header {
    padding-top: 20px;
}

/* Wraps the GC/SC header labels so they can be aligned as a pair against
   the data rows' shared value column on mobile. On desktop it stays
   "display: contents" so GC and SC keep behaving as two independent grid
   columns, same as before. */
.potable-cell-value {
    display: contents;
}

.potable-label {
    text-transform: uppercase;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.4px;
    color: var(--color-yellow-light, #FEC20E);
}

.potable-label-sc {
    color: var(--color-green, #2ECC71);
}

/* Data / footer rows */
.potable-row-label {
    font-weight: 700;
    font-size: 20px;
    color: var(--text-white, #fff);
}

.potable-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.potable-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: block;
}

.potable-value-text {
    font-weight: 800;
    font-size: 20px;
    white-space: nowrap;
}

.potable-value-gc .potable-value-text {
    background: linear-gradient(180deg, #FFD338 8.33%, #FCAF00 36.7%, #FFFF8B 103.53%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #FCAF00; /* fallback for browsers without background-clip: text support */
}

.potable-value-sc .potable-value-text {
    background: linear-gradient(180deg, #579415 -13.89%, #7AED00 23.66%, #D5F91C 88.89%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #7AED00; /* fallback for browsers without background-clip: text support */
}

.potable-value-dash {
    color: white;
    font-weight: 700;
}

.potable-placeholder {
    color: #999;
    padding: 20px 0;
}

/* Footer / total row: bolder + slightly larger, visually separated */
.potable-footer {
    border-bottom: none;
    border-top: none;
    margin-top: 4px;
}

.potable-footer .potable-row-label,
.potable-footer .potable-cell-freespins {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-yellow-light, #FEC20E);
}

.potable-footer .potable-value-text {
    font-size: 20px;
}

/* Mobile: stack GC/SC values and free spins under the offer label */
@media (max-width: 767px) {
    .purchase-offer-table-block {
        padding: 32px 16px;
    }

    .potable-heading {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .potable {
        padding: 4px 16px;
    }

    .potable-row {
        /* minmax(0, Nfr) instead of a bare Nfr: without it, each row's
           columns can shrink-to-fit that row's own content (min-width:
           auto on grid items), so short header text vs. a wrapped
           multi-line label produced slightly different column widths
           per row. Capping the minimum to 0 forces identical column
           widths across every row regardless of content. */
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(0, 1fr);
        grid-template-areas: "offer value freespins";
        column-gap: 10px;
        padding: 16px 0;
    }

    /* The GC/SC wrapper is a single grid item (the "value" column) on
       mobile, so it no longer relies on grid row-tracks to stack GC and
       SC - it sizes itself independently of the offer label's height, and
       the gap between GC and SC is a real, fixed flex gap. */
    .potable-cell-value {
        grid-area: value;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 2px;
        min-width: 0;
    }

    /* Header row: GC + SC sit side by side instead of stacked. */
    .potable-header .potable-cell-value {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }

    .potable-cell-offer {
        grid-area: offer;
        align-self: center;
        justify-content: center;
        text-align: center;
    }
    .potable-cell-gc,
    .potable-cell-sc {
        justify-content: flex-start;
        text-align: left;
    }
    .potable-header .potable-cell-gc,
    .potable-header .potable-cell-sc {
        justify-content: flex-start;
        text-align: left;
    }

    .potable-value-text {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .potable-cell-freespins {
        grid-area: freespins;
        align-self: center;
        font-size: 14px;
    }

    .potable-row-label {
        font-size: 14px;
    }

    .potable-label {
        font-size: 14px;
    }

    .potable-value-text,
    .potable-footer .potable-value-text {
        font-size: 14px;
    }

    .potable-icon {
        width: 18px;
        height: 18px;
    }

    .potable-footer .potable-row-label,
    .potable-footer .potable-cell-freespins {
        font-size: 14px;
    }
}

/* Extra-small phones: shrink the table content further so the numbers
   and labels still fit without overlapping/wrapping awkwardly. */
@media (max-width: 374px) {
    .potable-cell-freespins {
        font-size: 12px;
    }

    .potable-row-label {
        font-size: 12px;
    }

    .potable-label {
        font-size: 12px;
    }

    .potable-value-text,
    .potable-footer .potable-value-text {
        font-size: 12px;
    }

    .potable-footer .potable-row-label,
    .potable-footer .potable-cell-freespins {
        font-size: 12px;
    }
}

/* Editor-only: shown when "Enable Block" is off, so the disabled state
   isn't mistaken for an empty/broken block while editing. */
.potable-disabled-notice {
    max-width: 1200px;
    margin: 0 auto 12px;
    padding: 10px 16px;
    border: 1px dashed #FEC20E;
    border-radius: 8px;
    background: rgba(254, 194, 14, 0.08);
    color: #FEC20E;
    font-size: 13px;
}

.potable-block-disabled {
    opacity: 0.5;
}
