/*======= CLIENTCORE · CONFIGURAR SERVICIO: TARJETAS, CONTRASEÑA Y LICENCIAS (CC_VPS_V65) =======*/
/* Solo colores de brand.css */

#order-standard_cart.cc-configure-page .cc-cfg-card {
    margin: 0 0 18px;
    padding: 20px 22px 22px;
    border: 1px solid var(--brand-border);
    border-radius: 15px;
    background: var(--neutral-white);
}

#order-standard_cart.cc-configure-page .cc-cfg-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 18px;
}

#order-standard_cart.cc-configure-page .cc-cfg-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-lime-soft);
    box-shadow: inset 0 0 0 1.5px var(--brand-accent);
    color: var(--brand-icon-ink);
    font-size: 15px;
}

#order-standard_cart.cc-configure-page .cc-cfg-head h2 {
    margin: 2px 0 3px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--brand-dark);
}

#order-standard_cart.cc-configure-page .cc-cfg-head p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--brand-muted);
}

/* Grilla y campos */
#order-standard_cart.cc-configure-page .cc-cfg-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
}

#order-standard_cart.cc-configure-page .cc-cfg-col-12 { grid-column: span 12; }

#order-standard_cart.cc-configure-page .cc-cfg-card .form-group { margin: 0 0 16px; }
#order-standard_cart.cc-configure-page .cc-cfg-grid .form-group { margin: 0; }
#order-standard_cart.cc-configure-page .cc-cfg-card .field-container { margin: 0; }
#order-standard_cart.cc-configure-page .cc-cfg-card .field-container > .form-group:last-child { margin-bottom: 0; }
#order-standard_cart.cc-configure-page .cc-options-card .product-configurable-options .row { row-gap: 16px; }
#order-standard_cart.cc-configure-page .cc-options-card .product-configurable-options .form-group { margin: 0; }

#order-standard_cart.cc-configure-page .cc-cfg-field > label,
#order-standard_cart.cc-configure-page .cc-cfg-card .form-group > label {
    display: block;
    margin: 0 0 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-dark);
}

#order-standard_cart.cc-configure-page .cc-cfg-card .form-control {
    height: 46px;
    padding: 10px 13px;
    border: 1px solid var(--brand-border-6);
    border-radius: 10px;
    background-color: var(--neutral-white);
    color: var(--brand-ink);
    font-size: 14px;
    box-shadow: none;
}

#order-standard_cart.cc-configure-page .cc-cfg-card textarea.form-control { height: auto; min-height: 90px; }

#order-standard_cart.cc-configure-page .cc-cfg-card .form-control:focus {
    border-color: var(--brand-primary-600);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-600-rgb), .14);
}

#order-standard_cart.cc-configure-page .cc-cfg-help,
#order-standard_cart.cc-configure-page .cc-cfg-card .field-help-text {
    display: block;
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--brand-muted);
}

/* Contraseña root */
#order-standard_cart.cc-configure-page .cc-pass-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

#order-standard_cart.cc-configure-page .cc-pass-wrap { position: relative; flex: 1 1 auto; min-width: 0; }
#order-standard_cart.cc-configure-page .cc-pass-wrap .form-control { padding-right: 46px; }

#order-standard_cart.cc-configure-page .cc-pass-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--brand-muted);
    cursor: pointer;
}

#order-standard_cart.cc-configure-page .cc-pass-toggle:hover { background: var(--brand-soft-1); color: var(--brand-primary); }
#order-standard_cart.cc-configure-page .cc-pass-toggle:focus { outline: 0; }
#order-standard_cart.cc-configure-page .cc-pass-toggle:focus-visible { outline: 3px solid var(--brand-accent); }

#order-standard_cart.cc-configure-page .cc-cfg-btn-light {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--brand-border-6);
    border-radius: 10px;
    background: var(--brand-tint);
    color: var(--brand-primary);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
}

#order-standard_cart.cc-configure-page .cc-cfg-btn-light:hover,
#order-standard_cart.cc-configure-page .cc-cfg-btn-light:focus {
    border-color: var(--brand-primary);
    background: var(--brand-soft-1);
    color: var(--brand-primary);
}

#order-standard_cart.cc-configure-page .cc-pass-generated {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    background: var(--brand-soft-1);
    color: var(--state-success);
    font-size: 12.5px;
    font-weight: 600;
}

#order-standard_cart.cc-configure-page .cc-pass-generated.w-hidden { display: none; }

/* Opciones con candado */
#order-standard_cart.cc-configure-page .cc-opt-select { position: relative; }

#order-standard_cart.cc-configure-page .cc-opt-lock {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 26px;
    height: 26px;
    transform: translateY(-50%);
    border-radius: 7px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary);
    color: var(--brand-accent);
    font-size: 11px;
    pointer-events: none;
}

#order-standard_cart.cc-configure-page .cc-opt-field.is-locked .cc-opt-lock { display: inline-flex; }

#order-standard_cart.cc-configure-page .cc-opt-field.is-locked select {
    pointer-events: none;
    background-color: var(--brand-tint) !important;
    color: var(--brand-muted) !important;
    cursor: not-allowed;
}

#order-standard_cart.cc-configure-page .cc-opt-field.is-locked select::picker-icon { visibility: hidden; }

#order-standard_cart.cc-configure-page .cc-opt-field.is-locked > label { color: var(--brand-muted); }

#order-standard_cart.cc-configure-page .cc-opt-lock-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-primary);
}

#order-standard_cart.cc-configure-page .cc-opt-lock-note i { font-size: 11px; }

#order-standard_cart.cc-configure-page .cc-opt-lock-note[hidden] { display: none; }

@media (max-width: 575px) {
    #order-standard_cart.cc-configure-page .cc-cfg-card { padding: 18px 16px; }
    #order-standard_cart.cc-configure-page .cc-pass-row { flex-direction: column; }
    #order-standard_cart.cc-configure-page .cc-cfg-btn-light { justify-content: center; }
}

@media (max-width: 575px) {
    #order-standard_cart.cc-configure-page .cc-options-card .product-configurable-options .row > [class*="col-"] { margin-bottom: 14px; }
    #order-standard_cart.cc-configure-page .cc-options-card .product-configurable-options .row > [class*="col-"]:last-child { margin-bottom: 0; }
}

/*======= V66 · AVISO DE ACCESOS POR CORREO (VPS) =======*/
#order-standard_cart.cc-configure-page .cc-access-later {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--brand-lime-border);
    border-left: 5px solid var(--brand-primary);
    border-radius: 12px;
    background: var(--brand-lime-soft);
    color: var(--brand-ink);
}

#order-standard_cart.cc-configure-page .cc-access-later-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary);
    color: var(--brand-accent);
    font-size: 14px;
}

#order-standard_cart.cc-configure-page .cc-access-later strong {
    display: block;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 14px;
    color: var(--brand-dark);
}

#order-standard_cart.cc-configure-page .cc-access-later p {
    margin: 3px 0 0;
    font-size: 12.5px;
    line-height: 1.55;
}

/*======= V67 · OPCIONES DEL SERVICIO EN UNA SOLA COLUMNA =======*/
#order-standard_cart.cc-configure-page .cc-options-card .product-configurable-options .row {
    display: block;
    margin: 0;
}

#order-standard_cart.cc-configure-page .cc-options-card .product-configurable-options .row > [class*="col-"] {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 18px;
    padding: 0;
}

#order-standard_cart.cc-configure-page .cc-options-card .product-configurable-options .row > [class*="col-"]:last-child { margin-bottom: 0; }


/* Textos largos (ej. "Windows Server 2025 *requiere licencia...") sin chocar con la flecha */
#order-standard_cart.cc-configure-page .cc-options-card .cc-opt-select select.form-control {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    display: block !important;
    padding-right: 46px !important;
    background-image: none !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
}

/* Flecha propia (la lista nativa respeta el espacio y corta con "...") */
#order-standard_cart.cc-configure-page .cc-opt-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 19px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--brand-muted);
    border-bottom: 2px solid var(--brand-muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

#order-standard_cart.cc-configure-page .cc-opt-field.is-locked .cc-opt-select::after { display: none; }

/* WHMCS agrupa las opciones de a dos por fila: separar también las filas */
#order-standard_cart.cc-configure-page .cc-options-card .product-configurable-options .row + .row { margin-top: 18px; }
@media (max-width: 575px) {
    #order-standard_cart.cc-configure-page .cc-options-card .product-configurable-options .row + .row { margin-top: 14px; }
}

/*======= V69 · LISTAS DE OPCIONES CON EL ESTILO DE LA PLANTILLA (HOVER VERDE) =======*/
@supports (appearance: base-select) {
    #order-standard_cart.cc-configure-page .cc-options-card .cc-opt-select select.form-control {
        -webkit-appearance: base-select !important;
        appearance: base-select !important;
        display: flex !important;
        align-items: center;
    }

    #order-standard_cart.cc-configure-page .cc-opt-select select > button {
        display: flex;
        align-items: center;
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        border: 0;
        background: none;
        color: inherit;
        font: inherit;
        text-align: left;
        overflow: hidden;
    }

    #order-standard_cart.cc-configure-page .cc-opt-select select selectedcontent {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    /* La flecha la pone la lista; la propia solo para navegadores antiguos */
    #order-standard_cart.cc-configure-page .cc-opt-select::after { display: none; }

    #order-standard_cart.cc-configure-page .cc-opt-select select::picker(select) { max-width: calc(100vw - 32px); }
}

/*======= V70 · CICLOS DE PAGO CON COSTO DE INSTALACIÓN =======*/
#order-standard_cart.cc-configure-page .cc-billing-options .cc-billing-setup {
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--brand-ink);
    opacity: .8;
}

#order-standard_cart.cc-configure-page .cc-billing-options .cc-billing-price { white-space: nowrap; }

/*======= V95 · CICLOS Y OPCIONES EN UF (módulo UF Chile) =======*/
#order-standard_cart .cc-billing-card.is-uf .cc-billing-price {
    grid-row: 1;
    align-self: end;
    text-align: right;
}

#order-standard_cart .cc-billing-card.is-uf .cc-billing-clp {
    grid-column: 3;
    grid-row: 2;
    align-self: start;
    text-align: right;
    font-size: 12px;
    color: var(--brand-muted);
    white-space: nowrap;
}

#order-standard_cart .cc-billing-card.is-uf .cc-billing-saving {
    grid-row: 3;
    margin-top: 6px;
}

#order-standard_cart .cc-billing-card.is-uf .cc-billing-indicator,
#order-standard_cart .cc-billing-card.is-uf .cc-billing-information {
    grid-row: 1 / 4;
}

/*======= V97 · OPCIÓN OBLIGATORIA SIN ELEGIR =======*/
#order-standard_cart.cc-configure-page .cc-opt-missing select {
    border-color: var(--state-danger) !important;
    box-shadow: 0 0 0 3px rgba(164, 59, 54, .12);
}

#order-standard_cart.cc-configure-page .cc-opt-required-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--state-danger);
}

#order-standard_cart.cc-configure-page .cc-opt-missing select > button { border: 0 !important; box-shadow: none !important; }

/*======= V98 · ERROR EN EL CAMPO DEL NOMBRE DEL SERVIDOR =======*/
#order-standard_cart.cc-configure-page .cc-opt-missing input.form-control {
    border-color: var(--state-danger) !important;
    box-shadow: 0 0 0 3px rgba(164, 59, 54, .12);
}

#order-standard_cart.cc-configure-page .cc-opt-missing .cc-cfg-help { display: none; }
