/*
 * Dedicated-server grid.
 *
 * Uses the theme's existing custom properties so it inherits the palette rather
 * than restating it; nothing here defines a brand colour of its own.
 */

.sh-dedicated { padding: 3rem 0; }

.sh-dedicated-layout {
    display: grid;
    grid-template-columns: minmax(210px, 250px) 1fr;
    gap: 2rem;
    align-items: start;
}

/* The filter panel follows the page on desktop and collapses above the grid on
   narrow screens, where a sticky sidebar would eat the viewport. */
.sh-dedicated-filters {
    position: sticky;
    top: 1.5rem;
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: .75rem;
    background: #fff;
}

.sh-dedicated-filters-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: .5rem; margin-bottom: 1rem;
}
.sh-dedicated-filters-head h3 { margin: 0; font-size: 1rem; }

.sh-dedicated-reset {
    border: 0; background: none; padding: 0; cursor: pointer;
    font-size: .8125rem; text-decoration: underline; color: inherit; opacity: .75;
}
.sh-dedicated-reset:hover { opacity: 1; }

.sh-dedicated-facet { border: 0; padding: 0; margin: 0 0 1.25rem; }
.sh-dedicated-facet legend {
    padding: 0; margin-bottom: .5rem; font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em; opacity: .7;
}

.sh-dedicated-option {
    display: flex; align-items: center; gap: .5rem;
    padding: .3rem 0; cursor: pointer; font-size: .875rem;
}
.sh-dedicated-option input { margin: 0; flex: none; }
.sh-dedicated-option-name { flex: 1 1 auto; }
.sh-dedicated-flag { flex: none; font-size: 1rem; line-height: 1; }
.sh-dedicated-count { flex: none; font-size: .75rem; opacity: .6; font-variant-numeric: tabular-nums; }

.sh-dedicated-summary { margin: 0 0 1rem; font-size: .875rem; opacity: .75; }

.sh-dedicated-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.sh-dedicated-card {
    display: flex; flex-direction: column; gap: .75rem;
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: .75rem;
    background: #fff;
}
.sh-dedicated-card[hidden] { display: none; }
.sh-dedicated-card.is-open { box-shadow: 0 6px 24px rgba(0, 0, 0, .08); }

/* Two lines' worth of space whether the name needs them or not.
   "E3-1270 v5 3.6Ghz Intel Xeon CPU" wraps and "E-2236 3.4GHz Coffee Lake" does
   not, and without a reserved height the taller card stretched its whole grid
   row and pushed its neighbours' prices and buttons out of line. */
.sh-dedicated-card-title {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.3;
    min-height: calc(2 * 1.3em);
}

/* Every card in a row is the same height, so the price and the call to action
   sit on the same line across the row however long the specification list is. */
.sh-dedicated-grid { align-items: stretch; }
.sh-dedicated-card > .sh-dedicated-actions { margin-top: 0; }

.sh-dedicated-specs { margin: 0; display: grid; gap: .35rem; font-size: .875rem; }
.sh-dedicated-specs > div { display: flex; justify-content: space-between; gap: .75rem; }
.sh-dedicated-specs dt { opacity: .65; }
.sh-dedicated-specs dd { margin: 0; font-weight: 600; text-align: right; }

.sh-dedicated-locations { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.sh-dedicated-chip {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .15rem .5rem; border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 999px; font-size: .75rem;
}

/* The price and the buttons travel together to the bottom of the card.
   Pinning only the buttons left the price sitting straight under the location
   chips, so a server stocked in five facilities — two rows of chips — printed its
   price lower than the cards beside it. */
/* The price block is pinned to the bottom of the card; the location note sits
   with it, so `auto` moves to the note when there is one. */
.sh-dedicated-price { margin: auto 0 0; display: flex; align-items: baseline; gap: .35rem; }
.sh-dedicated-price:has(+ .sh-dedicated-price-note) { margin-bottom: .15rem; }
.sh-dedicated-price-note { margin: 0 0 0; font-size: .75rem; opacity: .7; }
.sh-dedicated-chip-premium { opacity: .75; font-variant-numeric: tabular-nums; }
.sh-dedicated-price strong { font-size: 1.5rem; }
.sh-dedicated-price span { font-size: .8125rem; opacity: .7; }

.sh-dedicated-actions { display: flex; align-items: center; gap: .75rem; }
.sh-dedicated-actions .sh-button { flex: 1 1 auto; text-align: center; }
.sh-dedicated-more {
    flex: none; border: 0; background: none; padding: .25rem; cursor: pointer;
    font-size: .8125rem; text-decoration: underline; color: inherit; opacity: .75;
}
.sh-dedicated-more:hover { opacity: 1; }

.sh-dedicated-detail { border-top: 1px solid rgba(0, 0, 0, .1); padding-top: .75rem; }
.sh-dedicated-detail h4 {
    margin: 0 0 .5rem; font-size: .75rem; text-transform: uppercase;
    letter-spacing: .05em; opacity: .7;
}
.sh-dedicated-detail h4 + * { margin-bottom: 1rem; }

.sh-dedicated-options { list-style: none; margin: 0; padding: 0; font-size: .8125rem; }
.sh-dedicated-options li { display: flex; justify-content: space-between; gap: .75rem; padding: .2rem 0; }
.sh-dedicated-options li span { opacity: .6; font-variant-numeric: tabular-nums; }

.sh-dedicated-empty { padding: 2rem 0; text-align: center; opacity: .7; }
.sh-dedicated-more-wrap { margin-top: 1.5rem; text-align: center; }

/* Its own style rather than the theme's secondary button: that one is built for
   a dark background and rendered as near-white text on this section's pale one,
   leaving the control almost unreadable. */
.sh-dedicated-showmore {
    display: inline-block;
    padding: .7rem 1.75rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: #fff;
    color: #0a1830;
    font-weight: 600;
    font-size: .9375rem;
    line-height: 1.2;
    cursor: pointer;
}
.sh-dedicated-showmore:hover,
.sh-dedicated-showmore:focus-visible { background: #0a1830; color: #fff; }
.sh-dedicated-showmore[hidden] { display: none; }

@media (max-width: 991px) {
    .sh-dedicated-layout { grid-template-columns: 1fr; }
    .sh-dedicated-filters { position: static; }
    .sh-dedicated-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 599px) {
    .sh-dedicated-grid { grid-template-columns: 1fr; }
}

/* Detail dialog.
   Opening the specification in place pushed every card below it down the page,
   so it lives in a dialog and the grid never moves. */
.sh-dedicated-dialog {
    width: min(640px, calc(100vw - 2rem));
    max-height: min(80vh, 720px);
    padding: 0;
    border: 0;
    border-radius: .75rem;
    background: #fff;
    color: inherit;
    overflow: hidden;
}
.sh-dedicated-dialog::backdrop { background: rgba(4, 12, 26, .6); }

/* Browsers without showModal() fall back to the `open` attribute, which is not
   modal and not centred, so it is placed here instead. */
.sh-dedicated-dialog[open] { display: flex; flex-direction: column; }

.sh-dedicated-dialog-head {
    flex: none;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid rgba(0, 0, 0, .1);
}
.sh-dedicated-dialog-head h3 { margin: 0; font-size: 1.0625rem; }

.sh-dedicated-dialog-close {
    flex: none; border: 0; background: none; cursor: pointer;
    font-size: 1.5rem; line-height: 1; padding: .25rem .5rem; color: inherit; opacity: .6;
}
.sh-dedicated-dialog-close:hover { opacity: 1; }

/* The head and the footer stay put; everything between them scrolls as one.
   `min-height: 0` is what makes that work: without it a flex child refuses to
   shrink below its content and the scrollbar never appears where it should. */
.sh-dedicated-dialog-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sh-dedicated-dialog-body { padding: 1.25rem 1.25rem 0; }
.sh-dedicated-dialog-body .sh-dedicated-detail { border-top: 0; padding-top: 0; }

.sh-dedicated-dialog-foot {
    flex: none;
    padding: 1rem 1.25rem; border-top: 1px solid rgba(0, 0, 0, .1);
    background: #fff;
}
.sh-dedicated-dialog-foot .sh-button { display: block; text-align: center; }

.sh-dedicated-price-symbol { font-size: 1rem; opacity: .8; }

/* Configurable options, fetched when the dialog opens. */
.sh-dedicated-dialog-options { padding: 1.25rem; padding-top: 0; }
.sh-dedicated-dialog-options h4 {
    margin: 0 0 .75rem; font-size: .75rem; text-transform: uppercase;
    letter-spacing: .05em; opacity: .7;
}
.sh-dedicated-optgroup { margin-bottom: 1rem; }
.sh-dedicated-optgroup h5 { margin: 0 0 .25rem; font-size: .875rem; }
.sh-dedicated-optgroup .sh-dedicated-options li {
    border-bottom: 1px solid rgba(0, 0, 0, .06); padding: .25rem 0;
}
.sh-dedicated-optgroup .sh-dedicated-options li:last-child { border-bottom: 0; }
.sh-dedicated-optgroup .sh-dedicated-options li span { font-weight: 600; opacity: 1; }
.sh-dedicated-loading { opacity: .6; font-size: .875rem; margin: 0; }

/* "From $X a month", and the toolbar above the grid. */
.sh-dedicated-from { margin: .75rem 0 0; font-size: 1rem; }
.sh-dedicated-from strong { font-size: 1.25rem; }

.sh-dedicated-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem;
}
.sh-dedicated-summary { margin: 0; }
.sh-dedicated-sort { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.sh-dedicated-sort select {
    padding: .35rem .5rem; border: 1px solid rgba(0, 0, 0, .2);
    border-radius: .35rem; background: #fff; color: inherit; font: inherit;
}

/* Operating systems, generated from the catalogue. */
.sh-dedicated-os { margin-top: 2.5rem; padding: 1.75rem; border-radius: .75rem; background: #fff; }
.sh-dedicated-os h3 { margin: 0 0 .35rem; font-size: 1.125rem; }
.sh-dedicated-os-lead { margin: 0 0 1.25rem; opacity: .75; font-size: .9375rem; }
/* Three across, two down: six families fit the shape exactly, and wider tiles
   leave the logo and the version name room to breathe. */
.sh-dedicated-os-list {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
}
.sh-dedicated-os-list li {
    padding: .85rem 1rem; border: 1px solid rgba(0, 0, 0, .1); border-radius: .5rem;
    display: flex; flex-direction: column; gap: .15rem;
}
.sh-dedicated-os-list strong { font-size: .9375rem; }
.sh-dedicated-os-list span { font-size: .8125rem; opacity: .7; }
.sh-dedicated-os-list em { font-size: .75rem; opacity: .55; font-style: normal; }

@media (max-width: 991px) { .sh-dedicated-os-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .sh-dedicated-os-list { grid-template-columns: 1fr; } }

/* Headline figures, counted from the catalogue on the page. */
.sh-dedicated-highlights {
    list-style: none; padding: 0;
    /* Space below as well as above: without it the strip sat flush against the
       filter panel and the grid, reading as one crowded block rather than a
       summary above the catalogue. */
    margin: 1.5rem 0 2rem;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
}
.sh-dedicated-highlights li {
    padding: 1rem 1.25rem;
    border-radius: var(--sh-radius-md, .875rem);
    background: var(--sh-white, #fff);
    box-shadow: var(--sh-shadow-card, 0 12px 32px rgba(22, 47, 82, .08));
    display: flex; flex-direction: column; gap: .15rem;
}
.sh-dedicated-highlights strong {
    font-family: var(--sh-font-heading, inherit);
    font-size: 1.5rem; line-height: 1.1; color: var(--sh-ink, #0a1830);
}
.sh-dedicated-highlights span { font-size: .8125rem; color: var(--sh-muted, #61708a); }

/* Operating system tiles. The mark is a real logo when the theme carries one and
   a lettered tile in the family's own colour otherwise, so the row reads as a
   designed set either way. */
.sh-dedicated-os-list li {
    flex-direction: row; align-items: center; gap: .75rem;
}
.sh-dedicated-os-mark {
    flex: none;
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--os-colour, #3978ff) 14%, #fff);
    color: var(--os-colour, #3978ff);
    border: 1px solid color-mix(in srgb, var(--os-colour, #3978ff) 35%, #fff);
    font-family: var(--sh-font-heading, inherit);
    font-weight: 700; font-size: 1.0625rem; line-height: 1;
}
.sh-dedicated-os-mark img { display: block; width: 24px; height: 24px; }
.sh-dedicated-os-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.sh-dedicated-os-text strong { font-size: .9375rem; }
.sh-dedicated-os-text > span { font-size: .8125rem; opacity: .7; }

@media (max-width: 991px) { .sh-dedicated-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .sh-dedicated-highlights { grid-template-columns: 1fr; } }

/* Self-managed against managed.
   A dark band, like the other trust sections on the site, so it reads as part of
   the page's rhythm rather than a table bolted on. */
.sh-dedicated-managed {
    margin-top: 3rem;
    padding: 2.75rem 0;
    background: var(--sh-navy, #071226);
    color: var(--sh-white, #fff);
}
.sh-dedicated-managed h3 {
    margin: 0 0 .5rem;
    font-family: var(--sh-font-heading, inherit);
    font-size: 1.5rem;
    text-align: center;
}
.sh-dedicated-managed-lead {
    margin: 0 auto 2rem;
    max-width: 52ch;
    text-align: center;
    opacity: .8;
    font-size: .9375rem;
}

.sh-dedicated-managed-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.sh-dedicated-managed-card {
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--sh-radius-md, .875rem);
    background: rgba(255, 255, 255, .04);
    display: flex; flex-direction: column; gap: .5rem;
}
/* The paid tier is the one being sold, so it carries the accent. */
.sh-dedicated-managed-card.is-featured {
    border-color: var(--sh-cyan, #35d8ff);
    background: rgba(53, 216, 255, .07);
}
.sh-dedicated-managed-card h4 {
    margin: 0;
    font-family: var(--sh-font-heading, inherit);
    font-size: 1.125rem;
}
.sh-dedicated-managed-price { margin: 0 0 .5rem; font-size: .9375rem; opacity: .85; }
.sh-dedicated-managed-price strong { font-size: 1.375rem; opacity: 1; }
.sh-dedicated-managed-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.sh-dedicated-managed-card li { padding-left: 1.35rem; position: relative; font-size: .875rem; opacity: .9; }
.sh-dedicated-managed-card li::before {
    content: ""; position: absolute; left: 0; top: .45em;
    width: .5rem; height: .5rem; border-radius: 50%;
    background: var(--sh-cyan, #35d8ff);
}
.sh-dedicated-managed-plus { margin: auto 0 0; padding-top: .75rem; font-size: .875rem; opacity: .85; }
.sh-dedicated-managed-note {
    margin: 1.5rem auto 0; max-width: 60ch; text-align: center;
    font-size: .8125rem; opacity: .65;
}

@media (max-width: 767px) { .sh-dedicated-managed-grid { grid-template-columns: 1fr; } }
