/**
 * Royel OnePage Checkout V2
 * Clean one-page style for WHMCS standard_cart parent.
 * Server location option intentionally hidden.
 */
:root {
    --rh2-primary: #0877ff;
    --rh2-primary-dark: #0453b7;
    --rh2-accent: #00a56a;
    --rh2-bg: #ffffff;
    --rh2-soft: #f5f8fb;
    --rh2-card: #ffffff;
    --rh2-text: #15233b;
    --rh2-muted: #6b7588;
    --rh2-border: #e8edf3;
    --rh2-green: #006b46;
    --rh2-shadow: 0 12px 32px rgba(21, 35, 59, .08);
    --rh2-radius: 14px;
}

body.rh2-ready,
body:has(#rh-opc-v2) {
    background: #fff !important;
}

#rh-opc-v2.rh2-wrap {
    max-width: 1120px;
    margin: 0 auto 50px;
    padding: 16px;
    color: var(--rh2-text);
    font-family: inherit;
}

.rh2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 6px 0 18px;
}
.rh2-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--rh2-green);
    font-weight: 800;
    margin-bottom: 8px;
}
.rh2-header h1 {
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.1;
    margin: 0 0 8px;
    font-weight: 900;
    color: #101827;
}
.rh2-header p {
    margin: 0;
    color: var(--rh2-muted);
    font-size: 14px;
}
.rh2-help {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    background: #eef7ff;
    color: var(--rh2-primary-dark) !important;
    border: 1px solid #d9ecff;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
    white-space: nowrap;
}

.rh2-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 18px;
}
.rh2-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid var(--rh2-border);
    border-radius: 12px;
    background: #fff;
    color: var(--rh2-muted);
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(21, 35, 59, .04);
}
.rh2-step span,
.rh2-panel-title > span {
    display: inline-flex;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    background: #e9f3ff;
    color: var(--rh2-primary);
    font-weight: 900;
    font-size: 12px;
    flex: 0 0 auto;
}
.rh2-step.active {
    border-color: rgba(8, 119, 255, .35);
    color: #0d1d35;
}
.rh2-step.active span {
    background: var(--rh2-primary);
    color: #fff;
}

.rh2-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 20px;
    align-items: start;
}
.rh2-main {
    display: grid;
    gap: 16px;
    min-width: 0;
}
.rh2-panel,
.rh2-summary {
    background: var(--rh2-card);
    border: 1px solid var(--rh2-border);
    border-radius: var(--rh2-radius);
    box-shadow: var(--rh2-shadow);
}
.rh2-panel { padding: 20px; }
.rh2-panel-title {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.rh2-panel-title h2 {
    margin: 0 0 3px;
    color: #111a2c;
    font-size: 18px;
    font-weight: 900;
}
.rh2-panel-title p {
    margin: 0;
    color: var(--rh2-muted);
    font-size: 13px;
}
.rh2-payment-title {
    border-top: 1px solid var(--rh2-border);
    padding-top: 16px;
    margin-top: 18px;
}
.rh2-package-box {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    background: #fbfcfe;
    border: 1px solid var(--rh2-border);
    border-radius: 12px;
    padding: 15px;
}
.rh2-package-box small { color: var(--rh2-muted); font-weight: 700; }
.rh2-package-box h3 { margin: 3px 0; font-size: 20px; font-weight: 900; }
.rh2-product-desc { color: var(--rh2-muted); font-size: 13px; line-height: 1.5; }
.rh2-change-plan {
    align-self: center;
    background: #f0f7ff;
    color: var(--rh2-primary-dark) !important;
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 800;
    white-space: nowrap;
}

.rh2-aside { position: sticky; top: 16px; }
.rh2-summary { padding: 16px; }
.rh2-summary-head small {
    display: block;
    color: var(--rh2-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.rh2-summary-head strong {
    display: block;
    font-size: 18px;
    color: #111a2c;
    margin-top: 2px;
}
.rh2-summary-placeholder {
    color: var(--rh2-muted);
    font-size: 13px;
    margin: 14px 0;
    padding: 12px;
    background: #fbfcfe;
    border: 1px dashed var(--rh2-border);
    border-radius: 10px;
}
.rh2-trust {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    font-size: 12px;
    color: #33445f;
    font-weight: 800;
}
.rh2-trust i { color: var(--rh2-primary); width: 18px; }

.rh2-domain-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.rh2-domain-cards > div {
    border: 1px solid var(--rh2-border);
    background: #fbfcfe;
    border-radius: 12px;
    padding: 14px;
    display: grid;
    gap: 5px;
}
.rh2-domain-cards i { color: var(--rh2-primary); font-size: 18px; }
.rh2-domain-cards strong { font-size: 13px; color: #111a2c; }
.rh2-domain-cards small { color: var(--rh2-muted); line-height: 1.4; }

/* Standard cart compatibility */
.rh2-core-panel #order-standard_cart,
#rh-opc-v2 #order-standard_cart {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}
#rh-opc-v2 #order-standard_cart .cart-sidebar,
#rh-opc-v2 #order-standard_cart .header-lined,
#rh-opc-v2 #order-standard_cart .view-cart-tabs,
#rh-opc-v2 #order-standard_cart .sidebar-collapsed,
#rh-opc-v2 #order-standard_cart .sidebar-categories-collapsed,
#rh-opc-v2 #order-standard_cart .categories-collapsed,
#rh-opc-v2 #order-standard_cart .secondary-cart-sidebar {
    display: none !important;
}
#rh-opc-v2 #order-standard_cart .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
#rh-opc-v2 #order-standard_cart .cart-body,
#rh-opc-v2 #order-standard_cart .secondary-cart-body,
#rh-opc-v2 #order-standard_cart .col-md-8,
#rh-opc-v2 #order-standard_cart .col-md-9,
#rh-opc-v2 #order-standard_cart .col-sm-8,
#rh-opc-v2 #order-standard_cart .col-sm-9 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
#rh-opc-v2 .sub-heading span,
#rh-opc-v2 #order-standard_cart .sub-heading span {
    display: inline-block;
    background: transparent !important;
    color: #111a2c !important;
    font-weight: 900;
    font-size: 16px;
    padding: 0;
}
#rh-opc-v2 .sub-heading {
    border: 0 !important;
    margin: 18px 0 12px !important;
}
#rh-opc-v2 .product-info {
    background: #fbfcfe !important;
    border: 1px solid var(--rh2-border) !important;
    border-radius: 12px !important;
    padding: 14px !important;
    margin-bottom: 16px !important;
}
#rh-opc-v2 .product-info .product-title {
    font-size: 18px !important;
    font-weight: 900 !important;
    color: #111a2c !important;
}

/* Billing cycle cards created by JS */
.rh2-cycle-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 6px 0 16px;
}
.rh2-cycle-card {
    border: 1px solid var(--rh2-border);
    background: #fff;
    border-radius: 12px;
    padding: 13px;
    text-align: left;
    cursor: pointer;
    transition: .15s ease;
    position: relative;
    min-height: 74px;
}
.rh2-cycle-card:hover { border-color: rgba(8,119,255,.45); transform: translateY(-1px); }
.rh2-cycle-card.active {
    border-color: var(--rh2-accent);
    box-shadow: inset 0 0 0 1px var(--rh2-accent), 0 10px 24px rgba(0, 165, 106, .12);
}
.rh2-cycle-card.active:after {
    content: "✓";
    position: absolute;
    right: 10px;
    top: 8px;
    background: var(--rh2-accent);
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
}
.rh2-cycle-card strong { display: block; font-size: 13px; color: #111a2c; margin-bottom: 5px; }
.rh2-cycle-card span { display: block; color: var(--rh2-muted); font-size: 12px; line-height: 1.35; }
#rh-opc-v2 select[name="billingcycle"].rh2-source-hidden { display: none !important; }

/* Form styling */
#rh-opc-v2 input[type="text"],
#rh-opc-v2 input[type="email"],
#rh-opc-v2 input[type="password"],
#rh-opc-v2 input[type="tel"],
#rh-opc-v2 select,
#rh-opc-v2 textarea,
#rh-opc-v2 .form-control,
#rh-opc-v2 .custom-select {
    border: 1px solid #dfe7f0 !important;
    border-radius: 9px !important;
    min-height: 40px;
    box-shadow: none !important;
}
#rh-opc-v2 label { font-weight: 700; color: #2a3850; font-size: 13px; }
#rh-opc-v2 .form-group { margin-bottom: 12px; }
#rh-opc-v2 .field-container {
    border: 1px solid var(--rh2-border) !important;
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    margin-bottom: 14px;
}

/* Domain section styling */
.rh2-configure-domains #order-standard_cart .domain-selection-options,
.rh2-configure-domains #order-standard_cart .domain-lookup-primary-loader,
.rh2-configure-domains #order-standard_cart .domain-input-group,
.rh2-configure-domains #order-standard_cart .domain-checker-container,
.rh2-configure-domains #order-standard_cart .domain-lookup-result {
    border-radius: 12px !important;
}
.rh2-configure-domains #order-standard_cart .domain-input-group,
.rh2-configure-domains #order-standard_cart .domain-checker-bg,
.rh2-configure-domains #order-standard_cart .domain-checker-container {
    background: var(--rh2-green) !important;
    border-color: var(--rh2-green) !important;
    padding: 12px !important;
}
.rh2-configure-domains #order-standard_cart .btn-primary,
.rh2-configure-domains #order-standard_cart button[type="submit"],
.rh2-configure-domains #order-standard_cart input[type="submit"] {
    background: #083f2e !important;
    border-color: #083f2e !important;
}

/* Addons */
#rh-opc-v2 .addon-products,
#rh-opc-v2 .product-addon,
#rh-opc-v2 .addon-promo-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
#rh-opc-v2 .addon-product,
#rh-opc-v2 .product-addon,
#rh-opc-v2 .addon-promo-container > div {
    border: 1px solid var(--rh2-border) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(21,35,59,.04) !important;
}

/* Payment methods */
#rh-opc-v2 .payment-methods,
#rh-opc-v2 .gateway-input-container,
#rh-opc-v2 .radio-inline {
    border-color: var(--rh2-border) !important;
}
#rh-opc-v2 label[for^="paymentmethod"],
#rh-opc-v2 .gateway-name,
#rh-opc-v2 .payment-methods label {
    cursor: pointer;
}

/* Buttons */
#rh-opc-v2 .btn-primary,
#rh-opc-v2 button[type="submit"],
#rh-opc-v2 input[type="submit"],
#rh-opc-v2 #btnCompleteOrder,
#rh-opc-v2 .checkout {
    background: var(--rh2-accent) !important;
    border-color: var(--rh2-accent) !important;
    color: #fff !important;
    border-radius: 9px !important;
    font-weight: 900 !important;
    min-height: 42px;
}
#rh-opc-v2 .btn-default,
#rh-opc-v2 .btn-secondary {
    border-radius: 9px !important;
}

/* Order summary moved to right */
#rhOpcLiveSummary .order-summary,
#rhOpcLiveSummary .summary-container,
#rhOpcLiveSummary #orderSummary,
#rhOpcLiveSummary .view-cart-summary,
#rhOpcLiveSummary .cart-total {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: 0 !important;
}
#rhOpcLiveSummary h2,
#rhOpcLiveSummary h3,
#rhOpcLiveSummary .summary-title {
    font-size: 17px !important;
    font-weight: 900 !important;
}
#rhOpcLiveSummary .total-due-today,
#rhOpcLiveSummary .amt,
#rhOpcLiveSummary .total {
    color: #111a2c !important;
    font-weight: 900 !important;
}
#rh-opc-v2 .rh2-moved-summary-placeholder { display: none !important; }

/* Hide server location option intentionally */
#rh-opc-v2 .rh2-hide-server-location { display: none !important; }

/* Empty cart cleanup */
.rh2-viewcart .rh2-core-panel .empty-cart,
.rh2-viewcart #order-standard_cart .empty-cart {
    border: 1px dashed var(--rh2-border);
    border-radius: 12px;
    padding: 22px;
    background: #fbfcfe;
}

@media (max-width: 991px) {
    #rh-opc-v2.rh2-wrap { padding: 12px; }
    .rh2-layout { grid-template-columns: 1fr; }
    .rh2-aside { position: static; }
    .rh2-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rh2-cycle-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rh2-domain-cards { grid-template-columns: 1fr; }
    .rh2-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
    .rh2-panel { padding: 14px; }
    .rh2-cycle-cards { grid-template-columns: 1fr; }
    #rh-opc-v2 .addon-products,
    #rh-opc-v2 .product-addon,
    #rh-opc-v2 .addon-promo-container { grid-template-columns: 1fr; }
    .rh2-package-box { flex-direction: column; }
}

/* V2.1 Product group/package list page fix */
.rh2-products-panel {
    max-width: 1120px;
    margin: 24px auto 0;
}
.rh2-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.rh2-product-card {
    position: relative;
    border: 1px solid var(--rh2-border);
    border-radius: 18px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .07);
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
}
.rh2-product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 100, 255, .28);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .11);
}
.rh2-product-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #e8f9ef;
    color: var(--rh2-success);
    border: 1px solid #bdeccf;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 11px;
}
.rh2-product-head h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--rh2-dark);
    font-weight: 900;
}
.rh2-product-description {
    color: var(--rh2-muted);
    font-size: 13px;
    line-height: 1.55;
}
.rh2-product-price {
    border-top: 1px solid var(--rh2-border);
    border-bottom: 1px solid var(--rh2-border);
    padding: 12px 0;
}
.rh2-product-price strong {
    font-size: 26px;
    color: var(--rh2-dark);
    font-weight: 900;
}
.rh2-product-price small {
    color: var(--rh2-muted);
    margin-left: 4px;
}
.rh2-product-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
    font-size: 13px;
    color: var(--rh2-text);
}
.rh2-product-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.rh2-product-features i { color: var(--rh2-success); margin-top: 2px; }
.rh2-order-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--rh2-success), #007a35);
    color: #fff !important;
    font-weight: 900;
    text-decoration: none !important;
    box-shadow: 0 12px 28px rgba(0, 145, 68, .22);
}
.rh2-order-btn:hover { color: #fff !important; filter: brightness(.98); }
.rh2-empty-products {
    border: 1px dashed var(--rh2-border);
    background: #fbfcfe;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}
.rh2-empty-products h3 { margin: 0 0 8px; color: var(--rh2-dark); font-weight: 900; }
.rh2-empty-products p { margin: 0 0 14px; color: var(--rh2-muted); }
.rh2-empty-products .rh2-order-btn { max-width: 220px; margin: 0 auto; }
@media (max-width: 991px) {
    .rh2-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .rh2-product-grid { grid-template-columns: 1fr; }
}
