/* ---- Size cards (the hero "pick your tier" cards) ---- */
.gs-size-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    padding: 1.75rem 1.5rem;
    border-radius: var(--v2-radius);
    background: linear-gradient(180deg, var(--v2-ink-2) 0%, #0E1226 100%);
    border: 1px solid var(--v2-line-2);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    color: var(--v2-text-invert);
    text-decoration: none;
    height: 100%;
}
.gs-size-card:hover {
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow:
        0 0 0 1px rgba(106, 242, 229, .4),
        0 20px 40px rgba(0, 0, 0, .5);
}
.gs-size-card.selected {
    background: linear-gradient(rgba(17, 22, 49, .95), rgba(17, 22, 49, .95)) padding-box,
                var(--v2-grad) border-box;
    border: 1px solid transparent;
}
.gs-size-card__icon {
    position: absolute;
    top: 1rem; right: 1.25rem;
    width: auto;
    height: auto;
    font-size: 1.6rem;
    line-height: 1;
    opacity: .7;
    pointer-events: none;
}
.gs-size-card__icon i {
    display: block;
    font-size: inherit;
    line-height: 1;
    width: auto;
    height: auto;
}
.gs-size-card__header { display: flex; align-items: center; justify-content: space-between; }
.gs-size-card__name {
    font-family: var(--v2-mono);
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--v2-accent);
}
.gs-size-card__price {
    display: flex; align-items: baseline; gap: .35rem;
    margin: .15rem 0 .35rem;
}
.gs-size-card__price .price {
    font-size: 2.25rem; font-weight: 700;
    letter-spacing: -.03em; line-height: 1;
    color: var(--v2-text-invert);
}
.gs-size-card__price .period {
    font-family: var(--v2-mono);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--v2-text-dim);
}
.gs-size-card__price .billed-as {
    font-family: var(--v2-mono);
    font-size: .66rem !important;
    letter-spacing: .06em;
    color: var(--v2-text-dim) !important;
    margin-top: .25rem !important;
}
/* Size-card specs grid — re-skinned to mirror the DS Configure
   ds-tier-card__specs pattern (#105 round-2 D5). The user
   explicitly called the DS specs table "really professional"
   and asked to bring it to GS. Two-column grid, each row has
   an accent-tinted icon block and a bold value followed by
   its label. .gs-size-card__specs flexbox-column → grid 2-up,
   .spec-item icons → square tinted backgrounds. Dashed top
   border separates the price + size label from the specs,
   matching the DS visual treatment exactly (round-2 follow-up). */
.gs-size-card__specs {
    list-style: none;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .35rem .65rem;
    padding: .65rem 0 0;
    border-top: 1px dashed var(--v2-line-2);
    margin-top: .5rem;
}
.gs-size-card__specs .spec-item {
    display: flex; align-items: center; gap: .4rem;
    padding: 0;
    background: transparent;
    border: 0;
    font-family: var(--v2-mono);
    font-size: .68rem;
    letter-spacing: .04em;
    color: var(--v2-text-dim);
}
.gs-size-card__specs .spec-item i {
    flex-shrink: 0;
    width: 1.6rem; height: 1.6rem;
    border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(106, 242, 229, .1);
    border: 1px solid rgba(106, 242, 229, .3);
    color: var(--v2-accent);
    font-size: .82rem;
    margin: 0;
}
.gs-size-card__specs .spec-item strong {
    color: var(--v2-text-invert);
    font-weight: 600;
}
/* Bundled-addon callouts on GS size cards. Mirror of
   .ds-tier-card__includes / .sa-size-card__includes — same
   shape (one li per included plan), same data source
   (price.IncludedPlans M2M), only the prefix class differs.
   Sits between the specs grid and the in-stock badge. */
.gs-size-card__includes {
    list-style: none;
    margin: .35rem 0 .25rem;
    padding: .5rem 0 0;
    border-top: 1px dashed var(--v2-line-2);
    display: flex; flex-direction: column;
    gap: .3rem;
    font-family: var(--v2-mono);
    font-size: .68rem;
    color: var(--v2-text-dim);
}
.gs-size-card__includes li {
    display: flex; align-items: center; gap: .45rem;
    line-height: 1.3;
}
.gs-size-card__includes li i {
    color: var(--v2-accent);
    font-size: .85rem;
    width: 1rem;
    flex-shrink: 0;
}
.gs-size-card__includes li strong {
    color: var(--v2-text-invert);
    font-weight: 600;
}
.gs-size-card .in-stock-badge {
    display: inline-flex; align-items: center;
    align-self: flex-start;
    font-family: var(--v2-mono);
    font-size: .62rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .25rem .6rem;
    border-radius: 999px;
    background: rgba(49, 217, 165, .12);
    color: var(--v2-success);
    border: 1px solid rgba(49, 217, 165, .35);
    margin-top: .25rem;
}
/* Sold-out variant — parity with DS .ds-tier-card__stock--out and
   SA .sa-size-card__stock--out. JS repaints the chip on every region
   change by toggling this modifier; the initial state is rendered
   server-side from Model.ServiceAvailability for the default region. */
.gs-size-card .in-stock-badge--out {
    background: rgba(232, 99, 88, .12);
    color: var(--v2-danger);
    border-color: rgba(232, 99, 88, .35);
}
/* Visually de-emphasize sold-out cards so the customer's eye lands
   on something selectable. The card stays clickable (so they can
   still inspect specs / change region to make it available again),
   but the cursor + opacity hint that a region change is needed. */
.gs-size-card.gs-size-card--out {
    opacity: .55;
}
.gs-size-card .badge {
    position: absolute;
    /* Explicit top/right + bottom/left=auto to override the theme.css
       `.badge { position: relative; bottom: 1px; }` rule that otherwise
       stretches the absolutely-positioned badge to full card height. */
    top: -.7rem;
    right: 1.25rem;
    bottom: auto;
    left: auto;
    display: inline-block;
    width: auto;
    height: auto;
    font-family: var(--v2-mono);
    font-size: .62rem;
    line-height: 1.4;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    padding: .22rem .65rem;
    border-radius: 999px;
    white-space: nowrap;
    z-index: 1;
}
.gs-size-card .badge.badge-free { background: var(--v2-success); color: #0A0E1F; }
.gs-size-card .badge.badge-standard { background: var(--v2-accent); color: #0A0E1F; }
.gs-size-card .badge.badge-premium { background: var(--v2-grad); color: #0A0E1F; }

/* Free-tier promo block inside the free-tier size card */
.free-tier-promo {
    display: grid; gap: .5rem;
    padding: 1rem 1.25rem;
    background: rgba(49, 217, 165, .06);
    border: 1px solid rgba(49, 217, 165, .3);
    border-radius: var(--v2-radius-sm);
    min-width: 220px;
}
.free-tier-promo .promo-item {
    display: flex; align-items: center; gap: .5rem;
    font-size: .82rem;
    color: var(--v2-text-invert);
}
.free-tier-promo .promo-item i {
    width: 1rem;
    color: var(--v2-success);
}

/* ---- Tier section headers (Free / Standard / Premium groupings) ---- */
.gs-tier-section { margin-bottom: 2rem; }
.gs-tier-section:last-child { margin-bottom: 0; }
.gs-tier-section__header {
    display: flex; align-items: center; flex-wrap: wrap; gap: .75rem;
    margin-bottom: 1rem;
    padding-bottom: .65rem;
    border-bottom: 1px dashed var(--v2-line-2);
}
.gs-tier-section__header h6 {
    font-family: var(--v2-mono);
    font-size: .75rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--v2-text-invert);
    margin: 0;
}
.gs-tier-section__header h6 i { color: var(--v2-accent); }
.gs-tier-section__header .tier-badge {
    font-family: var(--v2-mono);
    font-size: .6rem;
    letter-spacing: .14em;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-weight: 700;
}
.gs-tier-section__header .tier-info {
    font-family: var(--v2-mono);
    font-size: .7rem;
    letter-spacing: .08em;
    color: var(--v2-text-dim);
}

/* ---- Region cards ---- */
/* CSS grid so region cards share row height; `equalizeCardHeights`
   JS (below) pins them all to the max. */
#regionSelector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 0;
}
#regionSelector > [class*="col-"] {
    flex: unset;
    max-width: unset;
    width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
}
@media (max-width: 767.98px) {
    #regionSelector { grid-template-columns: 1fr; }
}
.gs-region-card {
    display: flex; align-items: center; gap: .85rem;
    padding: .9rem 1.1rem;
    border-radius: var(--v2-radius);
    background: linear-gradient(180deg, var(--v2-ink-2) 0%, #0E1226 100%);
    border: 1px solid var(--v2-line-2);
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    width: 100%;
    height: 100%;
}
.gs-region-card:hover {
    transform: translateY(-2px);
    border-color: rgba(106, 242, 229, .4);
}
.gs-region-card.selected {
    background: linear-gradient(rgba(17, 22, 49, .95), rgba(17, 22, 49, .95)) padding-box,
                var(--v2-grad) border-box;
    border: 1px solid transparent;
}
.gs-region-card__flag {
    flex-shrink: 0;
    width: 40px; height: 28px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--v2-line-2);
    line-height: 0;
}
.gs-region-card__flag img {
    display: block;
    width: 100%; height: 100%;
    object-fit: cover;
    vertical-align: top;
}
.gs-region-card__info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.gs-region-card__name {
    font-size: .95rem;
    font-weight: 600;
    color: var(--v2-text-invert);
    letter-spacing: -.01em;
}
.gs-region-card__location {
    font-family: var(--v2-mono);
    font-size: .68rem;
    letter-spacing: .08em;
    color: var(--v2-text-dim);
}
.gs-region-card__latency {
    flex-shrink: 0;
    font-family: var(--v2-mono);
    font-size: .72rem;
    letter-spacing: .06em;
    padding: .28rem .6rem;
    border-radius: 999px;
}
.gs-region-card__latency.latency-loading {
    background: rgba(255, 255, 255, .05);
    color: var(--v2-text-dim);
    border: 1px solid var(--v2-line-2);
}
.gs-region-card__latency.latency-good {
    background: rgba(49, 217, 165, .12);
    color: var(--v2-success);
    border: 1px solid rgba(49, 217, 165, .35);
}
.gs-region-card__latency.latency-moderate {
    background: rgba(234, 185, 108, .1);
    color: #EAB96C;
    border: 1px solid rgba(234, 185, 108, .35);
}
.gs-region-card__latency.latency-poor {
    background: rgba(255, 107, 122, .08);
    color: #ff6b7a;
    border: 1px solid rgba(255, 107, 122, .35);
}

/* ---- Mod loader / Steam branch cards (Minecraft + Steam branch) ---- */
#modLoaderFamilySelector,
#steamBranchSelector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 0;
}
#modLoaderFamilySelector > [class*="col-"],
#steamBranchSelector > [class*="col-"] {
    flex: unset;
    max-width: unset;
    width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
}
@media (max-width: 767.98px) {
    #modLoaderFamilySelector,
    #steamBranchSelector { grid-template-columns: 1fr; }
}
.gs-modloader-card {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: 1rem 1.25rem;
    border-radius: var(--v2-radius);
    background: linear-gradient(180deg, var(--v2-ink-2) 0%, #0E1226 100%);
    border: 1px solid var(--v2-line-2);
    cursor: pointer;
    transition: border-color .2s, transform .2s, box-shadow .2s;
    width: 100%;
    height: 100%;
}
.gs-modloader-card:hover {
    transform: translateY(-2px);
    border-color: rgba(106, 242, 229, .4);
}
.gs-modloader-card.selected {
    background: linear-gradient(rgba(17, 22, 49, .95), rgba(17, 22, 49, .95)) padding-box,
                var(--v2-grad) border-box;
    border: 1px solid transparent;
}
.gs-modloader-card__icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(10, 14, 31, .65);
    border: 1px solid var(--v2-line-2);
    display: flex; align-items: center; justify-content: center;
    color: var(--v2-accent);
    font-size: 1.25rem;
}
.gs-modloader-card__icon img { width: 28px; height: 28px; object-fit: contain; }
.gs-modloader-card__info { display: flex; flex-direction: column; min-width: 0; }
.gs-modloader-card__name {
    font-size: .98rem;
    font-weight: 600;
    color: var(--v2-text-invert);
    letter-spacing: -.01em;
}
.gs-modloader-card__desc {
    font-family: var(--v2-mono);
    font-size: .68rem;
    letter-spacing: .08em;
    color: var(--v2-text-dim);
}

/* ---- Add-on option rows in the sidebar ----
   GS-specific N-of-M palette pattern + JS-driven flash animations.
   DS / SA use a simpler `.ds-addon-card` / `.sa-addon-card` pattern. */
.gs-addon-card {
    display: flex; align-items: center; gap: .75rem;
    padding: .7rem .85rem;
    border-radius: var(--v2-radius-sm);
    background: rgba(10, 14, 31, .55);
    border: 1px solid var(--v2-line-2);
    cursor: pointer;
    margin-bottom: .4rem;
    transition: border-color .2s, background .2s;
    position: relative;
}
.gs-addon-card:hover { border-color: rgba(106, 242, 229, .45); }
.gs-addon-card.selected {
    background: linear-gradient(rgba(10, 14, 31, .85), rgba(10, 14, 31, .85)) padding-box,
                var(--v2-grad) border-box;
    border: 1px solid transparent;
}
.gs-addon-card.disabled { opacity: .4; cursor: not-allowed; }
.gs-addon-card .gs-addon-card__icon {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(106, 242, 229, .1);
    border: 1px solid rgba(106, 242, 229, .3);
    color: var(--v2-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem;
    /* Reset line-height so the inner <i> glyph sits flush in the
       middle of the box. Without this, the inherited 1.5× line-
       height pushes the glyph into the lower half of its line-box
       (icons looked dropped a few px below center on Configure
       addon cards). Mirrors the DS .ds-addon-card__icon fix. */
    line-height: 1;
}
.gs-addon-card .gs-addon-card__icon i {
    line-height: 1;
    display: block;
    /* Reset margin so any Bootstrap utility class baked into
       the IconClass (mr-1 etc.) doesn't shift the glyph
       left of center via flex justify-content's margin-box
       centering. GS already strips `mr-1` via
       IconClass.Replace, but this catches any other utility
       that slips through. !important is required because
       Bootstrap 4 utilities (.mr-1, .mr-2, .ml-1, .mt-1, …)
       themselves declare !important — without it, this rule
       loses the cascade. */
    margin: 0 !important;
}
.gs-addon-card .gs-addon-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gs-addon-card .gs-addon-card__name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--v2-text-invert);
    letter-spacing: -.005em;
}
.gs-addon-card .gs-addon-card__price {
    flex-shrink: 0;
    font-family: var(--v2-mono);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--v2-text-invert);
    white-space: nowrap;
}
/* Green for "Included" — matches the DS pattern the user asked us
   to standardize on (was --v2-accent / teal previously). */
.gs-addon-card.included .gs-addon-card__price { color: var(--v2-success); }
/* Plan description rendered under the name in `.gs-addon-card__body`.
   Mono / dim / small to read as supporting copy without
   competing with the name on each row. */
.gs-addon-card .gs-addon-card__desc {
    font-family: var(--v2-mono);
    font-size: .66rem;
    letter-spacing: .04em;
    color: var(--v2-text-dim);
    line-height: 1.35;
    margin-top: .15rem;
}
/* Themed mono-cased section header — replaces the plain <h6>
   "Technical Support" / "Backup Service" / "FTP Access" labels
   and adds an accent-colored icon next to the heading. Mirrors
   the DS Configure ds-addon-group__label visual treatment. */
.addon-section-label {
    font-family: var(--v2-mono);
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--v2-text-dim);
    margin-bottom: .55rem;
    display: flex;
    align-items: center;
    gap: .45rem;
}
.addon-section-label i { color: var(--v2-accent); }

/* Palette-specific addon icon backgrounds — names kept identical to
   what the JS selects on. */
.gs-addon-card.addon-2-opt-0 .gs-addon-card__icon,
.gs-addon-card.addon-3-opt-0 .gs-addon-card__icon,
.gs-addon-card.addon-4-opt-0 .gs-addon-card__icon {
    background: rgba(255, 107, 122, .12);
    border-color: rgba(255, 107, 122, .35);
    color: #ff6b7a;
}
.gs-addon-card.addon-4-opt-1 .gs-addon-card__icon {
    background: rgba(234, 185, 108, .12);
    border-color: rgba(234, 185, 108, .35);
    color: #EAB96C;
}
.gs-addon-card.addon-3-opt-1 .gs-addon-card__icon,
.gs-addon-card.addon-4-opt-2 .gs-addon-card__icon {
    background: rgba(106, 242, 229, .12);
    border-color: rgba(106, 242, 229, .35);
    color: var(--v2-accent);
}
.gs-addon-card.addon-2-opt-1 .gs-addon-card__icon,
.gs-addon-card.addon-3-opt-2 .gs-addon-card__icon,
.gs-addon-card.addon-4-opt-3 .gs-addon-card__icon {
    background: rgba(151, 108, 230, .14);
    border-color: rgba(151, 108, 230, .35);
    color: var(--v2-purple);
}

/* Flash animations — JS toggles these on included-addon change.
   Glow-only pulse (animates only box-shadow). Background and color
   stay on the resting palette/.selected styles, so when the
   animation ends the tile naturally settles back into its real
   resting state instead of snapping to a wrong final value. */
@keyframes addonFlashDanger  { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 122, 0); } 30% { box-shadow: 0 0 16px 2px rgba(255, 107, 122, .5); } }
@keyframes addonFlashWarning { 0%, 100% { box-shadow: 0 0 0 0 rgba(234, 185, 108, 0); } 30% { box-shadow: 0 0 16px 2px rgba(234, 185, 108, .5); } }
@keyframes addonFlashInfo    { 0%, 100% { box-shadow: 0 0 0 0 rgba(106, 242, 229, 0); } 30% { box-shadow: 0 0 16px 2px rgba(106, 242, 229, .5); } }
@keyframes addonFlashPrimary { 0%, 100% { box-shadow: 0 0 0 0 rgba(151, 108, 230, 0); } 30% { box-shadow: 0 0 16px 2px rgba(151, 108, 230, .5); } }
.gs-addon-card.flash-danger  { animation: addonFlashDanger  .8s ease-out; }
.gs-addon-card.flash-warning { animation: addonFlashWarning .8s ease-out; }
.gs-addon-card.flash-info    { animation: addonFlashInfo    .8s ease-out; }
.gs-addon-card.flash-primary { animation: addonFlashPrimary .8s ease-out; }

/* Icon-tile glow pulse (paired with above). */
@keyframes addonIconFlashDanger  { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 122, 0); } 30% { box-shadow: 0 0 12px 1px rgba(255, 107, 122, .6); } }
@keyframes addonIconFlashWarning { 0%, 100% { box-shadow: 0 0 0 0 rgba(234, 185, 108, 0); } 30% { box-shadow: 0 0 12px 1px rgba(234, 185, 108, .6); } }
@keyframes addonIconFlashInfo    { 0%, 100% { box-shadow: 0 0 0 0 rgba(106, 242, 229, 0); } 30% { box-shadow: 0 0 12px 1px rgba(106, 242, 229, .6); } }
@keyframes addonIconFlashPrimary { 0%, 100% { box-shadow: 0 0 0 0 rgba(151, 108, 230, 0); } 30% { box-shadow: 0 0 12px 1px rgba(151, 108, 230, .6); } }
.gs-addon-card.flash-danger  .gs-addon-card__icon { animation: addonIconFlashDanger  .8s ease-out; }
.gs-addon-card.flash-warning .gs-addon-card__icon { animation: addonIconFlashWarning .8s ease-out; }
.gs-addon-card.flash-info    .gs-addon-card__icon { animation: addonIconFlashInfo    .8s ease-out; }
.gs-addon-card.flash-primary .gs-addon-card__icon { animation: addonIconFlashPrimary .8s ease-out; }
