/* ======================================================
   WHMCS STANDARD CART — CLOUD PANEL THEME (AZUL PRO)
   Compatível WHMCS 8.11.x
====================================================== */

:root {
    --primary: #0f5bd7;
    --primary-dark: #0a3d91;
    --primary-light: #eaf1ff;
    --accent: #1e7bff;

    --text: #1a2b4c;
    --muted: #6b85b6;

    --bg: #f4f8ff;
    --card-bg: #ffffff;
    --border: #dbe6ff;

    --radius: 14px;
}

/* ===== DARK MODE AUTO ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #3b82f6;
        --primary-dark: #1e40af;
        --primary-light: rgba(59,130,246,0.12);

        --text: #e6edff;
        --muted: #9fb3ff;

        --bg: #0b1220;
        --card-bg: #111a30;
        --border: rgba(255,255,255,0.08);
    }
}

/* ======================================================
   BASE
====================================================== */

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

/* ======================================================
   NAVBAR
====================================================== */

.navbar,
.top-nav {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    border: none;
    box-shadow: 0 10px 30px rgba(10,61,145,0.25);
}

.navbar a,
.top-nav a {
    color: #fff !important;
    font-weight: 500;
}

/* ======================================================
   SIDEBAR CLOUD STYLE
====================================================== */

.panel-sidebar,
.sidebar {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 12px 35px rgba(10,61,145,0.08);
    padding: 10px 0;
}

/* itens do menu */
.panel-sidebar .list-group-item {
    border: none;
    border-radius: 10px;
    margin: 6px 12px;
    padding: 12px 14px;
    font-weight: 500;
    color: var(--text);
    position: relative;
    transition: all .2s ease;
}

/* hover */
.panel-sidebar .list-group-item:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: translateX(4px);
}

/* ===== ITEM ATIVO SUPER VISÍVEL ===== */
.panel-sidebar .list-group-item.active,
.sidebar .list-group-item.active {
    background: linear-gradient(90deg, var(--primary), var(--accent)) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(15,91,215,0.35);
}

/* barra lateral indicadora */
.panel-sidebar .list-group-item.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 10px;
    background: #fff;
}

/* texto interno do ativo */
.panel-sidebar .list-group-item.active a,
.panel-sidebar .list-group-item.active span {
    color: #fff !important;
}

/* ======================================================
   CARDS / CONTAINERS
====================================================== */

.panel,
.card,
.main-content,
.content-block {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 12px 35px rgba(10,61,145,0.08);
}

/* ======================================================
   TITLES
====================================================== */

h1, h2, h3 {
    color: var(--primary-dark);
    font-weight: 600;
}

/* ======================================================
   ORDER SUMMARY (CAIXA DIREITA)
====================================================== */

.order-summary,
.summary-container,
.viewcart-sidebar {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: var(--radius);
    border: none;
    box-shadow: 0 20px 40px rgba(10,61,145,0.35);
}

.order-summary .price,
.summary-container .price {
    font-size: 30px;
    font-weight: 700;
}

/* ======================================================
   BUTTONS CLOUD STYLE
====================================================== */

.btn,
.btn-primary,
button[type="submit"] {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(15,91,215,0.35);
    transition: all .2s ease;
}

.btn:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15,91,215,0.45);
}

/* botão secundário */
.btn-default {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--primary);
}

/* ======================================================
   INPUTS
====================================================== */

.form-control,
input,
select {
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    padding: 10px 12px;
}

.form-control:focus,
input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15,91,215,0.15);
}

/* ======================================================
   TABELAS
====================================================== */

.table {
    border-radius: var(--radius);
    overflow: hidden;
}

.table thead {
    background: var(--primary-light);
}

/* ======================================================
   LINKS
====================================================== */

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
}

/* ======================================================
   SCROLLBAR MODERNA
====================================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--primary-dark));
    border-radius: 20px;
}

/* ======================================================
   RESPONSIVO
====================================================== */

@media (max-width: 768px) {
    .order-summary {
        margin-top: 20px;
    }

    .panel-sidebar {
        margin-bottom: 20px;
    }
}

/* ======================================================
   ANIMAÇÃO GLOBAL SUAVE
====================================================== */

* {
    transition: background .2s ease,
                box-shadow .2s ease,
                color .2s ease,
                border .2s ease,
                transform .2s ease;
}

/* remover seletor de idioma completamente */
.language-selector,
.navbar .dropdown-language,
#languageChooser,
li.language,
div[id*="language"],
div[class*="language"] {
    display: none !important;
}

/* ======================================================
   TÍTULO DE PRODUTO — CLOUD STYLE
====================================================== */

/* container do produto */
.product-details,
.product-info,
div[class*="product"] {
    border-radius: 14px;
    overflow: hidden;
}

/* título principal do plano */
.product-details h3,
.product-info h3,
h3.product-title,
div[class*="product"] h3 {
    font-size: 22px;
    font-weight: 700;
    color: #0a3d91;
    background: linear-gradient(90deg, #eaf1ff, #ffffff);
    padding: 14px 18px;
    margin: -1px -1px 15px -1px;
    border-bottom: 1px solid #dbe6ff;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    letter-spacing: .2px;
}

/* barra azul lateral premium */
.product-details h3::before,
.product-info h3::before,
h3.product-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 20px;
    background: linear-gradient(#0f5bd7, #1e7bff);
    border-radius: 10px;
    margin-right: 10px;
    vertical-align: middle;
}

/* separação visual do conteúdo */
.product-details ul {
    margin-top: 10px;
}

/* preço mais elegante */
.product-details .price {
    font-size: 20px;
    font-weight: 700;
    color: #0f5bd7;
}

/* ======================================================
   CORREÇÃO DE COMBOBOX / SELECT CORTANDO TEXTO
====================================================== */

/* padrão WHMCS */
select.form-control,
.form-control[type="text"],
.form-control {
    height: 42px !important;
    line-height: 1.4 !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
}

/* garante alinhamento vertical do texto */
select {
    min-height: 42px;
    display: block;
}

/* remove estilos herdados que estouram altura */
select.form-control:not([size]):not([multiple]) {
    height: 42px !important;
}

/* seta do dropdown alinhada */
select.form-control {
    background-position: right 12px center;
}

/* versão premium opcional */
select.form-control {
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
}

/* ======================================================
   CARRINHO — CONTRASTE E LEGIBILIDADE
====================================================== */

/* bloco principal do carrinho */
.viewcart,
.cart-items,
.cart-body {
    background: var(--card-bg) !important;
    color: var(--text) !important;
}

/* cada item do carrinho */
.cart-item,
tr.cart-item,
.cart-item-row {
    background: #ffffff !important;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 6px 18px rgba(10,61,145,0.08);
}

/* alternância leve */
.cart-item:nth-child(even),
.cart-item-row:nth-child(even) {
    background: #f7faff !important;
}

/* nomes dos produtos */
.cart-item-title,
.cart-item h3,
.cart-item strong {
    color: #0a3d91 !important;
    font-weight: 600;
}

/* textos secundários */
.cart-item small,
.cart-item .text-muted {
    color: #5c6f99 !important;
}

/* preço */
.cart-item .price,
.cart-item .amount {
    color: #0f5bd7 !important;
    font-weight: 700;
}

/* ======================================================
   BOTÕES DO CARRINHO
====================================================== */

/* editar / atualizar */
.cart-item .btn,
.cart-item button {
    background: linear-gradient(90deg, #0f5bd7, #1e7bff);
    color: #ffffff !important;
    border-radius: 8px;
    font-size: 13px;
    padding: 6px 12px;
}

/* botão remover (X) */
.cart-item .btn-danger,
.cart-item .remove-item {
    background: #e11d48 !important;
    color: #ffffff !important;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ======================================================
   TABELA DO CARRINHO
====================================================== */

.table.cart {
    background: transparent;
}

.table.cart thead th {
    background: #0a3d91 !important;
    color: #ffffff !important;
    border: none;
}

/* células */
.table.cart td {
    color: var(--text) !important;
    vertical-align: middle;
}

/* ======================================================
   RESUMO DO PEDIDO (DIREITA)
====================================================== */

.order-summary,
.viewcart-sidebar {
    background: linear-gradient(180deg, #0f5bd7, #0a3d91);
    color: #ffffff;
}

/* valores */
.order-summary .amount,
.order-summary .total,
.viewcart-sidebar strong {
    color: #ffffff;
    font-weight: 700;
}

/* botão finalizar */
.order-summary .btn-primary,
.viewcart-sidebar .btn-primary {
    background: linear-gradient(90deg, #1e7bff, #60a5fa);
    font-size: 15px;
}

/* link continuar comprando */
.order-summary a,
.viewcart-sidebar a {
    color: #cfe1ff !important;
}

/* ======================================================
   CUPOM DE DESCONTO
====================================================== */

.promo-code,
.apply-promo {
    background: #ffffff !important;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(10,61,145,0.08);
}

.promo-code input {
    color: var(--text) !important;
}

/* ======================================================
   BOTÕES DO CARRINHO — CONTRASTE ALTO
====================================================== */

/* todos os botões principais */
.viewcart .btn,
.cart-items .btn,
button,
input[type="submit"] {
    background: linear-gradient(90deg, #0f5bd7, #1e7bff) !important;
    color: #ffffff !important;
    border: none !important;
    opacity: 1 !important;
    text-shadow: none !important;
    box-shadow: 0 4px 12px rgba(15,91,215,0.25) !important;
}

/* hover */
.viewcart .btn:hover,
.cart-items .btn:hover,
button:hover,
input[type="submit"]:hover {
    background: linear-gradient(90deg, #0a3d91, #0f5bd7) !important;
    color: #ffffff !important;
}

/* botão atualizar quantidade */
.cart-items .btn-update,
.viewcart .btn-update {
    padding: 6px 14px;
    font-size: 13px;
}

/* botão editar */
.cart-items .btn-edit {
    background: #2563eb !important;
}

/* botão remover */
.cart-items .btn-danger,
.cart-items .remove-item {
    background: #e11d48 !important;
    color: #ffffff !important;
}

/* ======================================================
   CUPOM PROMOCIONAL — LEGÍVEL
====================================================== */

/* container */
.promo-code,
.apply-promo,
.cart-promo {
    background: #ffffff !important;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(10,61,145,0.08);
}

/* input do cupom */
.promo-code input,
.apply-promo input,
.cart-promo input {
    background: #ffffff !important;
    color: #1a2b4c !important;
    border: 1px solid #dbe6ff !important;
    height: 42px;
}

/* botão validar cupom */
.promo-code .btn,
.apply-promo .btn,
.cart-promo .btn {
    background: linear-gradient(90deg, #0f5bd7, #1e7bff) !important;
    color: #ffffff !important;
    font-weight: 600;
    opacity: 1 !important;
}

/* botão desabilitado visível */
.btn[disabled],
button[disabled] {
    background: #9fb3ff !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

/* ======================================================
   CORREÇÃO DE TEXTO DENTRO DE BOTÕES
====================================================== */

.btn span,
.btn small,
.btn strong {
    color: #ffffff !important;
}

/* ======================================================
   BOTÃO EDITAR DO CARRINHO — CORREÇÃO DEFINITIVA
====================================================== */

/* botão editar (todas variações do WHMCS) */
.viewcart .btn-edit,
.cart-items .btn-edit,
a.btn-edit,
.btn.btn-edit,
.btn-link.btn-edit,
.cart-item a[href*="configure"] {
    background: linear-gradient(90deg, #2563eb, #1e7bff) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    opacity: 1 !important;
    text-shadow: none !important;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25) !important;
}

/* hover */
.viewcart .btn-edit:hover,
.cart-items .btn-edit:hover,
a.btn-edit:hover {
    background: linear-gradient(90deg, #1e40af, #2563eb) !important;
    color: #ffffff !important;
}

/* ícone dentro do botão */
.btn-edit i,
.btn-edit span {
    color: #ffffff !important;
}

/* remove transparência herdada */
.btn-link {
    opacity: 1 !important;
}

/* ======================================================
   BOTÃO EDITAR — FIX FINAL (WHMCS 8.11)
====================================================== */

/* captura todas variações possíveis */
.viewcart a.btn,
.viewcart .btn,
.cart-items a.btn,
.cart-items .btn,
.cart-item a,
.cart-item .btn-edit,
a[href*="configureproduct"],
a[href*="cart.php?a=conf"] {
    color: #ffffff !important;
}

/* estilo visual do botão editar */
.cart-item a.btn,
.cart-item .btn-edit,
a[href*="configureproduct"],
a[href*="cart.php?a=conf"] {
    background: linear-gradient(90deg, #0f5bd7, #1e7bff) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 16px !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    opacity: 1 !important;
}

/* texto dentro do botão */
.cart-item a.btn *,
.cart-item .btn-edit *,
a[href*="configureproduct"] * {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* hover */
.cart-item a.btn:hover,
.cart-item .btn-edit:hover {
    background: linear-gradient(90deg, #0a3d91, #0f5bd7) !important;
    color: #ffffff !important;
}

/* ======================================================
   TÍTULO DO PRODUTO — CORREÇÃO SEM CORTAR BORDA
====================================================== */

/* header do produto */
.product-details h3,
.product-info h3,
h3.product-title,
div[class*="product"] h3 {

    font-size: 20px;
    font-weight: 700;
    color: #0a3d91;

    background: #f4f8ff;              /* fundo suave */
    padding: 14px 18px;
    margin: 0 0 15px 0;               /* remove margem negativa */
    border-bottom: 1px solid #dbe6ff;

    border-top-left-radius: 14px;
    border-top-right-radius: 14px;

    position: relative;
}

/* indicador azul interno (não invade mais) */
.product-details h3::before,
.product-info h3::before,
h3.product-title::before {

    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    background: linear-gradient(#0f5bd7, #1e7bff);
    border-radius: 10px;
    margin-right: 10px;
    vertical-align: middle;
}

/* garante que o container não seja cortado */
.product-details,
.product-info,
div[class*="product"] {
    overflow: visible !important;
}

/* ======================================================
   ESPAÇAMENTO BOTÕES — TEMPLATE STANDARD_CART
====================================================== */

/* container dos botões do resumo */
#order-standard_cart .summary-container .checkout-btns,
#order-standard_cart .summary-container .btn {
    display: block;
    width: 100%;
}

/* botão FINALIZAR */
#order-standard_cart .summary-container .btn-success,
#order-standard_cart .summary-container .btn-primary {
    margin-bottom: 14px !important;
}

/* botão CONTINUAR COMPRANDO */
#order-standard_cart .summary-container .btn-default,
#order-standard_cart .summary-container .btn-secondary {
    margin-top: 0 !important;
    background: rgba(255,255,255,0.12) !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    color: #ffffff !important;
    opacity: 0.95;
}

/* respiro geral do bloco */
#order-standard_cart .summary-container {
    padding-bottom: 18px;
}