/* ============================================================
   Hosting Configurator - single-host.php
   ============================================================ */

/* ---------- Section wrapper ---------- */
.hc-section {
    padding: 70px 0;
    background: #fff;
    direction: rtl;
}

.hc-section .container {
    padding-right: 2rem;
    padding-left: 2rem;
}

.hc-section__title {
    margin: 0 0 3.6rem;
    color: #072b45;
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    letter-spacing: 0;
}

/* ---------- Grid ---------- */
.hc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 2.4rem;
    align-items: stretch;
}

/* ---------- Card ---------- */
.hc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
    height: 100%;
    padding: 3rem 2.6rem 2.6rem;
    overflow: visible;
    background: #fff;
    border: 1px solid #dbe7ef;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(7, 43, 69, 0.08);
    color: #3f505b;
    text-align: right;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hc-card:hover,
.hc-card:focus-within {
    border-color: #05acf2;
    box-shadow: 0 16px 36px rgba(7, 43, 69, 0.13);
    transform: translateY(-2px);
}

.hc-card--popular {
    border-color: #05acf2;
    box-shadow: 0 16px 34px rgba(5, 172, 242, 0.16);
}

/* ---------- Popular badge ---------- */
.hc-badge {
    position: absolute;
    top: -1.2rem;
    right: 2.2rem;
    z-index: 2;
    padding: 0.45rem 1.2rem;
    background: #05acf2;
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(5, 172, 242, 0.24);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
}

/* ---------- Card header ---------- */
.hc-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 5.6rem;
    padding-bottom: 1.8rem;
    border-bottom: 1px solid #edf3f7;
    text-align: right;
}

.hc-card__name {
    margin: 0;
    color: #072b45;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0;
}

.hc-card__tagline {
    margin: 0;
    color: #5f7280;
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.45;
}

/* ---------- Price ---------- */
.hc-price {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.8rem;
    color: #072b45;
    line-height: 1;
    text-align: right;
}

.hc-price--sale {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
}

.hc-price__current {
    display: inline-flex;
    align-items: baseline;
    gap: 0.8rem;
}

.hc-price__discount {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    line-height: 1.2;
}

.hc-price__previous {
    color: #8495a0;
    font-size: 1.45rem;
    font-weight: 700;
    text-decoration: line-through;
    text-decoration-thickness: 0.12em;
}

.hc-price__previous span {
    margin-inline-start: 0.12em;
}

.hc-price__sale-badge {
    padding: 0.35rem 0.75rem;
    background: #e9f9f2;
    border: 1px solid #bdebd7;
    border-radius: 999px;
    color: #0b7a4b;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.hc-price__main {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
}

.hc-price__amount {
    color: #072b45;
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: 0;
}

.hc-price__currency {
    color: #072b45;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.hc-price__separator,
.hc-price__period {
    color: #5f7280;
    font-size: 1.5rem;
    font-weight: 600;
}

/* ---------- Resource list ---------- */
.hc-resources {
    display: grid;
    gap: 0;
    border-top: 1px solid #edf3f7;
    border-bottom: 1px solid #edf3f7;
}

.hc-resource {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.2rem;
    min-height: 5.2rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid #edf3f7;
    color: #072b45;
    direction: rtl;
}

.hc-resource:last-child {
    border-bottom: 0;
}

.hc-resource__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 3.4rem;
    width: 3.4rem;
    height: 3.4rem;
    background: #edf8fd;
    color: #0579a9;
    border-radius: 8px;
}

.hc-resource__icon svg {
    display: block;
    width: 1.8rem;
    height: 1.8rem;
    stroke: currentColor;
}

.hc-resource__value {
    min-width: 0;
    color: #072b45;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
    direction: ltr;
    unicode-bidi: isolate;
}

/* Range slider - kept for compatibility with older configurator markup */
.hc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 0.6rem;
    border-radius: 999px;
    background: #dbe7ef;
    outline: none;
    cursor: pointer;
}

.hc-slider-track {
    position: relative;
    height: 0.6rem;
    margin-bottom: 0.4rem;
    border-radius: 999px;
    background: #dbe7ef;
}

.hc-slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 999px;
    background: #05acf2;
    pointer-events: none;
    transition: width 0.1s;
}

.hc-slider-input {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 50%;
    width: 100%;
    height: 100%;
    margin: 0;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.hc-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.8rem;
    height: 1.8rem;
    background: #fff;
    border: 3px solid #05acf2;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(7, 43, 69, 0.18);
    cursor: pointer;
    transition: transform 0.15s;
}

.hc-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.12);
}

.hc-slider-input::-moz-range-thumb {
    width: 1.8rem;
    height: 1.8rem;
    background: #fff;
    border: 3px solid #05acf2;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(7, 43, 69, 0.18);
    cursor: pointer;
}

.hc-slider-wrapper {
    position: relative;
    padding: 0.6rem 0;
}

.hc-slider-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 0.4rem;
}

.hc-slider-ticks span {
    color: #78909f;
    font-size: 1rem;
}

/* ---------- Visual pickers (OS / Datacenter) ---------- */
.hc-picker {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.hc-picker__title {
    margin: 0;
    color: #072b45;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-align: right;
}

.hc-picker__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.hc-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-width: 8.4rem;
    min-height: 4.4rem;
    padding: 0.9rem 1.2rem;
    background: #f7fafc;
    border: 1px solid #dbe7ef;
    border-radius: 8px;
    color: #3f505b;
    cursor: pointer;
    font: inherit;
    line-height: 1.2;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.hc-option:hover,
.hc-option:focus-visible {
    background: #edf8fd;
    border-color: #05acf2;
    color: #072b45;
    outline: none;
}

.hc-option--active {
    background: #e8f7fe;
    border-color: #05acf2;
    box-shadow: inset 0 0 0 1px #05acf2;
    color: #072b45;
}

.hc-option__icon {
    flex: 0 0 auto;
    font-size: 1.7rem;
    line-height: 1;
}

.hc-option__label {
    min-width: 0;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

/* ---------- Add to Cart button ---------- */
.hc-footer {
    margin-top: auto;
    padding-top: 0.4rem;
}

.hc-add-to-cart {
    width: 100%;
    min-height: 5rem;
    padding: 1.3rem 2rem;
    background: #072b45;
    color: #fff;
    border: 1px solid #072b45;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.hc-add-to-cart:hover,
.hc-add-to-cart:focus-visible {
    background: #054063;
    border-color: #054063;
    box-shadow: 0 10px 22px rgba(7, 43, 69, 0.18);
    outline: none;
    transform: translateY(-1px);
}

.hc-add-to-cart:active {
    transform: translateY(0);
}

.hc-add-to-cart:disabled {
    background: #9aa8b1;
    border-color: #9aa8b1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hc-section {
        padding: 5rem 0;
    }

    .hc-section .container {
        padding-right: 1.6rem;
        padding-left: 1.6rem;
    }

    .hc-section__title {
        margin-bottom: 2.4rem;
        font-size: 2.6rem;
    }

    .hc-grid {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }

    .hc-card {
        padding: 2.6rem 2rem 2rem;
    }

    .hc-card__header {
        min-height: 0;
    }

    .hc-price__amount {
        font-size: 3.3rem;
    }

    .hc-picker__options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hc-option {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 420px) {
    .hc-section .container {
        padding-right: 1.2rem;
        padding-left: 1.2rem;
    }

    .hc-card {
        gap: 1.8rem;
        padding: 2.4rem 1.6rem 1.8rem;
    }

    .hc-card__name {
        font-size: 2rem;
    }

    .hc-price {
        gap: 0.6rem;
    }

    .hc-price__amount {
        font-size: 3rem;
    }

    .hc-resource {
        gap: 1rem;
    }

    .hc-resource__value {
        font-size: 1.45rem;
    }

    .hc-option__label {
        font-size: 1.2rem;
    }
}
