/**
 * Hosting Plans Table — Frontend CSS
 *
 * Notas de arquitetura:
 *
 * 1. SPECIFICITY: Os seletores são propositadamente verbosos para ganhar à
 *    especificidade típica do Elementor Pro e outros temas. Onde podia ser
 *    `.hpt-cta`, escrevo `.hpt-wrapper .hpt-plan .hpt-cta`. Isto evita
 *    `!important` e mantém o CSS limpo.
 *
 * 2. CUSTOM PROPERTIES: As cores e raios vêm de variáveis CSS injetadas
 *    pelo plugin (HPT_Appearance::build_inline_css). Se algum utilizador
 *    avançado quiser sobrepor uma variável só numa página específica,
 *    pode fazê-lo no Custom CSS do Elementor.
 *
 * 3. ESTADOS DE LINK: Defino explicitamente :link, :visited, :hover, :focus,
 *    :active para evitar que estilos do tema/Elementor "vazem" para alguns
 *    estados que eu não tenha cobrado.
 */

/* ------------------------------------------------------------------ */
/* Wrapper                                                            */
/* ------------------------------------------------------------------ */

.hpt-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1f36;
    box-sizing: border-box;
}
.hpt-wrapper *,
.hpt-wrapper *::before,
.hpt-wrapper *::after { box-sizing: border-box; }

/* ------------------------------------------------------------------ */
/* Cabeçalho                                                          */
/* ------------------------------------------------------------------ */

.hpt-wrapper .hpt-header { text-align: center; margin-bottom: 28px; }

.hpt-wrapper .hpt-eyebrow {
    display: inline-block;
    background: var(--hpt-eyebrow-bg);
    color: var(--hpt-eyebrow-color);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 999px;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
    text-transform: uppercase;
}
.hpt-wrapper .hpt-title {
    font-size: 30px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--hpt-title-color);
    line-height: 1.2;
}
.hpt-wrapper .hpt-subtitle {
    font-size: 15px;
    color: var(--hpt-subtitle-color);
    margin: 0;
    line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* Switcher                                                           */
/* ------------------------------------------------------------------ */

.hpt-wrapper .hpt-switcher-wrapper { display: flex; justify-content: center; margin-bottom: 36px; }

.hpt-wrapper .hpt-switcher {
    display: inline-flex;
    background: var(--hpt-switcher-bg);
    padding: 4px;
    border-radius: 999px;
    gap: 2px;
}

/* Reset agressivo dos estilos do tema/Elementor para os botões do switcher */
.hpt-wrapper .hpt-switcher .hpt-switcher-btn,
.hpt-wrapper .hpt-switcher .hpt-switcher-btn:link,
.hpt-wrapper .hpt-switcher .hpt-switcher-btn:visited,
.hpt-wrapper .hpt-switcher .hpt-switcher-btn:hover,
.hpt-wrapper .hpt-switcher .hpt-switcher-btn:focus,
.hpt-wrapper .hpt-switcher .hpt-switcher-btn:active {
    border: none;
    background: transparent;
    padding: 9px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--hpt-switcher-text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    text-decoration: none;
    box-shadow: none;
    outline: none;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.hpt-wrapper .hpt-switcher .hpt-switcher-btn:hover {
    color: var(--hpt-switcher-text-active);
}

.hpt-wrapper .hpt-switcher .hpt-switcher-btn.is-active,
.hpt-wrapper .hpt-switcher .hpt-switcher-btn.is-active:hover,
.hpt-wrapper .hpt-switcher .hpt-switcher-btn.is-active:focus,
.hpt-wrapper .hpt-switcher .hpt-switcher-btn.is-active:active {
    background: var(--hpt-switcher-active-bg);
    color: var(--hpt-switcher-text-active);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Acessibilidade: indicador de foco por teclado */
.hpt-wrapper .hpt-switcher .hpt-switcher-btn:focus-visible {
    outline: 2px solid var(--hpt-switcher-text-active);
    outline-offset: 2px;
}

.hpt-wrapper .hpt-switcher .hpt-discount-badge {
    background: var(--hpt-discount-bg);
    color: var(--hpt-discount-color);
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Grid de planos                                                     */
/* ------------------------------------------------------------------ */

.hpt-wrapper .hpt-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: stretch;
}
.hpt-wrapper .hpt-plans-count-1 { grid-template-columns: minmax(280px, 360px); justify-content: center; }
.hpt-wrapper .hpt-plans-count-2 { grid-template-columns: repeat(2, minmax(260px, 320px)); justify-content: center; }
.hpt-wrapper .hpt-plans-count-3 { grid-template-columns: repeat(3, minmax(240px, 1fr)); }
.hpt-wrapper .hpt-plans-count-4 { grid-template-columns: repeat(4, minmax(220px, 1fr)); }

@media (max-width: 900px) {
    .hpt-wrapper .hpt-plans-count-3,
    .hpt-wrapper .hpt-plans-count-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .hpt-wrapper .hpt-plans,
    .hpt-wrapper .hpt-plans-count-1,
    .hpt-wrapper .hpt-plans-count-2,
    .hpt-wrapper .hpt-plans-count-3,
    .hpt-wrapper .hpt-plans-count-4 { grid-template-columns: 1fr; }
    .hpt-wrapper .hpt-title { font-size: 24px; }
    .hpt-wrapper .hpt-switcher .hpt-switcher-btn { padding: 8px 14px; font-size: 13px; }
}

/* ------------------------------------------------------------------ */
/* Cartão                                                             */
/* ------------------------------------------------------------------ */

.hpt-wrapper .hpt-plan {
    background: var(--hpt-card-bg);
    border: 1px solid var(--hpt-card-border);
    border-radius: var(--hpt-card-radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hpt-wrapper .hpt-plan:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}
.hpt-wrapper .hpt-plan-featured {
    border: 2px solid var(--hpt-featured-border);
    box-shadow: 0 8px 24px rgba(28, 92, 216, 0.1);
}
.hpt-wrapper .hpt-plan-featured:hover { box-shadow: 0 12px 32px rgba(28, 92, 216, 0.15); }

.hpt-wrapper .hpt-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--hpt-badge-bg);
    color: var(--hpt-badge-color);
    font-size: 10px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 999px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.hpt-wrapper .hpt-plan-header { margin-bottom: 18px; }
.hpt-wrapper .hpt-plan-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--hpt-plan-name-color);
}
.hpt-wrapper .hpt-plan-subtitle {
    font-size: 13px;
    color: var(--hpt-plan-subtitle-color);
    margin: 0;
    line-height: 1.5;
}

.hpt-wrapper .hpt-plan-pricing {
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid #f0f1f3;
}
.hpt-wrapper .hpt-price { display: flex; align-items: baseline; gap: 2px; margin-bottom: 4px; }
.hpt-wrapper .hpt-price-currency { font-size: 22px; font-weight: 600; color: var(--hpt-price-color); }
.hpt-wrapper .hpt-price-amount {
    font-size: 36px;
    font-weight: 600;
    color: var(--hpt-price-color);
    line-height: 1;
    transition: opacity 0.15s ease;
}
.hpt-wrapper .hpt-price-period { font-size: 13px; color: var(--hpt-plan-subtitle-color); margin-left: 4px; }
.hpt-wrapper .hpt-price-total { font-size: 12px; color: var(--hpt-price-total-color); margin: 0; transition: opacity 0.15s ease; }
.hpt-wrapper .hpt-price-amount.is-changing,
.hpt-wrapper .hpt-total-amount.is-changing { opacity: 0.4; }

.hpt-wrapper .hpt-plan-features { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.hpt-wrapper .hpt-plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--hpt-feature-color);
    line-height: 1.5;
}
.hpt-wrapper .hpt-check {
    flex-shrink: 0;
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--hpt-check-color);
    margin-top: 2px;
    position: relative;
}
.hpt-wrapper .hpt-check::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 4px;
    height: 7px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ------------------------------------------------------------------ */
/* CTA — combate Elementor Pro com specificity                        */
/* ------------------------------------------------------------------ */

.hpt-wrapper .hpt-plan .hpt-cta,
.hpt-wrapper .hpt-plan .hpt-cta:link,
.hpt-wrapper .hpt-plan .hpt-cta:visited {
    display: block;
    width: 100%;
    padding: 11px 20px;
    border: 1px solid var(--hpt-cta-border);
    background: var(--hpt-cta-bg);
    color: var(--hpt-cta-color);
    border-radius: var(--hpt-cta-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
    box-sizing: border-box;
    box-shadow: none;
}

.hpt-wrapper .hpt-plan .hpt-cta:hover,
.hpt-wrapper .hpt-plan .hpt-cta:focus,
.hpt-wrapper .hpt-plan .hpt-cta:active {
    background: var(--hpt-cta-hover-bg);
    color: var(--hpt-cta-hover-color);
    border-color: var(--hpt-cta-hover-bg);
    text-decoration: none;
}
.hpt-wrapper .hpt-plan .hpt-cta:focus-visible {
    outline: 2px solid var(--hpt-cta-hover-bg);
    outline-offset: 2px;
}

.hpt-wrapper .hpt-plan-featured .hpt-cta,
.hpt-wrapper .hpt-plan-featured .hpt-cta:link,
.hpt-wrapper .hpt-plan-featured .hpt-cta:visited {
    background: var(--hpt-cta-featured-bg);
    color: var(--hpt-cta-featured-color);
    border-color: var(--hpt-cta-featured-bg);
}
.hpt-wrapper .hpt-plan-featured .hpt-cta:hover,
.hpt-wrapper .hpt-plan-featured .hpt-cta:focus,
.hpt-wrapper .hpt-plan-featured .hpt-cta:active {
    background: var(--hpt-cta-featured-bg);
    color: var(--hpt-cta-featured-color);
    border-color: var(--hpt-cta-featured-bg);
    filter: brightness(0.92);
}
