/* ================================================================
   PLANOS.CSS — Modal de planos e pagamento (prefixo pgmt-)
   ================================================================ */

/* ----------------------------------------------------------------
   Overlay de bloqueio
   ---------------------------------------------------------------- */

.pgmt-bloqueio-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 10, 20, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 24px;
}

.pgmt-bloqueio-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 340px;
}

.pgmt-bloqueio-icon {
    font-size: 48px;
    color: #f59e0b;
}

.pgmt-bloqueio-box h2 {
    color: #f1f5f9;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.pgmt-bloqueio-box p {
    color: #94a3b8;
    font-size: 14px;
    margin: 0;
}

.pgmt-bloqueio-btn {
    margin-top: 4px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.pgmt-bloqueio-btn:hover {
    opacity: 0.88;
}

/* ----------------------------------------------------------------
   Overlay do modal
   ---------------------------------------------------------------- */

.pgmt-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 20, 0.80);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* ----------------------------------------------------------------
   Caixa do modal
   ---------------------------------------------------------------- */

.pgmt-modal {
    background: #0f1117;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 32px 28px 28px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.60);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.pgmt-modal::-webkit-scrollbar { width: 4px; }
.pgmt-modal::-webkit-scrollbar-track { background: transparent; }
.pgmt-modal::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
}

/* ----------------------------------------------------------------
   Botão fechar
   ---------------------------------------------------------------- */

.pgmt-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.07);
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 10;
}

.pgmt-close:hover {
    background: rgba(255, 255, 255, 0.13);
    color: #f1f5f9;
}

/* ----------------------------------------------------------------
   TELA 1 — Seleção de plano
   ---------------------------------------------------------------- */

.pgmt-header {
    margin-bottom: 24px;
    padding-right: 32px;
}

.pgmt-header h2 {
    color: #f1f5f9;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}

.pgmt-header p {
    color: #94a3b8;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

.pgmt-planos-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pgmt-plano-row {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
    gap: 12px;
    position: relative;
}

.pgmt-plano-row:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
}

.pgmt-plano-popular {
    border-color: rgba(99, 102, 241, 0.30);
    flex-wrap: wrap;
}

.pgmt-popular-badge {
    position: absolute;
    top: -10px;
    left: 14px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.pgmt-plano-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.pgmt-plano-nome {
    color: #f1f5f9;
    font-size: 15px;
    font-weight: 600;
}

.pgmt-plano-desc {
    color: #64748b;
    font-size: 12px;
}

.pgmt-plano-preco {
    color: #f1f5f9;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.pgmt-plano-preco small {
    color: #64748b;
    font-size: 11px;
    font-weight: 400;
}

.pgmt-arrow {
    color: #475569;
    font-size: 12px;
    flex-shrink: 0;
}

.pgmt-rodape {
    text-align: center;
    color: #334155;
    font-size: 11px;
    margin: 16px 0 0;
}

/* ----------------------------------------------------------------
   TELA 2 — Pagamento
   ---------------------------------------------------------------- */

.pgmt-pag-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pgmt-voltar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
    flex-shrink: 0;
}

.pgmt-voltar:hover {
    color: #94a3b8;
}

.pgmt-pag-resumo {
    color: #a5b4fc;
    font-size: 13px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 8px;
    padding: 5px 10px;
}

/* ----------------------------------------------------------------
   Abas Cartão / PIX
   ---------------------------------------------------------------- */

.pgmt-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 4px;
}

.pgmt-tab {
    flex: 1;
    padding: 9px 12px;
    background: none;
    border: none;
    border-radius: 7px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pgmt-tab.pgmt-tab-ativo {
    background: rgba(255, 255, 255, 0.10);
    color: #f1f5f9;
}

.pgmt-tab:hover:not(.pgmt-tab-ativo) {
    color: #94a3b8;
}

/* ----------------------------------------------------------------
   Campos do formulário
   ---------------------------------------------------------------- */

.pgmt-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
    position: relative;
}

.pgmt-field label {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}

.pgmt-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 14px;
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.pgmt-input::placeholder {
    color: #334155;
}

.pgmt-input:focus {
    border-color: rgba(99, 102, 241, 0.50);
}

.pgmt-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.pgmt-select option {
    background: #1e293b;
    color: #f1f5f9;
}

.pgmt-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pgmt-brand {
    position: absolute;
    right: 12px;
    bottom: 10px;
    color: #475569;
    font-size: 18px;
    pointer-events: none;
}

/* ----------------------------------------------------------------
   Toggle de recorrência
   ---------------------------------------------------------------- */

.pgmt-recorrente-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.20);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    margin-top: 4px;
}

.pgmt-recorrente-toggle:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.32);
}

.pgmt-recorrente-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid rgba(99, 102, 241, 0.50);
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    margin-top: 2px;
    position: relative;
    transition: background 0.2s, border-color 0.2s;
}

.pgmt-recorrente-toggle input[type="checkbox"]:checked {
    background: #6366f1;
    border-color: #6366f1;
}

.pgmt-recorrente-toggle input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.pgmt-recorrente-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pgmt-recorrente-titulo {
    color: #a5b4fc;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pgmt-recorrente-titulo i {
    font-size: 12px;
}

.pgmt-recorrente-desc {
    color: #64748b;
    font-size: 11px;
    line-height: 1.5;
}

/* ----------------------------------------------------------------
   Seção PIX
   ---------------------------------------------------------------- */

.pgmt-pix-aviso {
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
    line-height: 1.6;
    padding: 12px 0 4px;
}

.pgmt-pix-aviso i {
    color: #4ade80;
    margin-right: 6px;
}

#pgmt-pix-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 4px;
}

.pgmt-pix-qr-wrap {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    display: inline-flex;
}

.pgmt-pix-qr-wrap img {
    width: 180px;
    height: 180px;
    display: block;
}

.pgmt-pix-validade {
    color: #64748b;
    font-size: 12px;
    margin: 0;
}

.pgmt-pix-codigo-row {
    display: flex;
    gap: 6px;
    width: 100%;
}

.pgmt-pix-codigo-row input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    color: #64748b;
    font-size: 11px;
    padding: 8px 10px;
    outline: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
    box-sizing: border-box;
}

.pgmt-btn-copiar {
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.30);
    border-radius: 8px;
    color: #a5b4fc;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pgmt-btn-copiar:hover {
    background: rgba(99, 102, 241, 0.25);
}

.pgmt-btn-ja-paguei {
    width: 100%;
    padding: 11px;
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.28);
    border-radius: 10px;
    color: #4ade80;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pgmt-btn-ja-paguei:hover:not(:disabled) {
    background: rgba(74, 222, 128, 0.20);
}

.pgmt-btn-ja-paguei:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ----------------------------------------------------------------
   Botão assinar
   ---------------------------------------------------------------- */

#pgmt-acoes {
    margin-top: 6px;
}

.pgmt-btn-assinar {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.pgmt-btn-assinar:hover:not(:disabled) {
    opacity: 0.90;
    transform: translateY(-1px);
}

.pgmt-btn-assinar:active:not(:disabled) {
    transform: translateY(0);
}

.pgmt-btn-assinar:disabled {
    opacity: 0.50;
    cursor: not-allowed;
    transform: none;
}

.pgmt-seguro {
    text-align: center;
    color: #334155;
    font-size: 11px;
    margin: 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* ----------------------------------------------------------------
   Tela 3 — Gerenciar / Cancelar assinatura
   ---------------------------------------------------------------- */

.pgmt-gerenciar-info {
    margin: 18px 0 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.pgmt-gerenciar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 16px;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}

.pgmt-gerenciar-row:last-child {
    border-bottom: none;
}

.pgmt-gerenciar-label {
    color: #64748b;
}

.pgmt-gerenciar-valor {
    font-weight: 600;
    color: #1e293b;
}

.pgmt-reembolso-box {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.pgmt-reembolso-titulo {
    font-weight: 700;
    font-size: 13px;
    color: #166534;
    margin: 0 0 6px;
}

.pgmt-reembolso-desc {
    font-size: 13px;
    color: #15803d;
    margin: 0 0 8px;
    line-height: 1.6;
}

.pgmt-reembolso-aviso {
    font-size: 11px;
    color: #4ade80;
    margin: 0;
    line-height: 1.5;
    color: #166534;
    opacity: 0.75;
}

.pgmt-gerenciar-acoes {
    margin-top: 4px;
}

.pgmt-btn-cancelar-plano {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 2px solid #ef4444;
    border-radius: 10px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pgmt-btn-cancelar-plano:hover {
    background: #ef4444;
    color: #fff;
}

.pgmt-btn-cancelar-plano:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pgmt-cancelar-aviso {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    margin: 8px 0 0;
}

/* ----------------------------------------------------------------
   Banner: cartão vindo de configurações
   ---------------------------------------------------------------- */

.pgmt-banner-cartao-ctx {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #0369a1;
    margin-bottom: 14px;
}

.pgmt-banner-cartao-ctx i.fa-credit-card {
    font-size: 15px;
    flex-shrink: 0;
}

.pgmt-banner-cartao-ctx span {
    flex: 1;
}

.pgmt-banner-cartao-ctx button {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    font-size: 12px;
}

.pgmt-banner-cartao-ctx button:hover {
    color: #64748b;
}

/* ----------------------------------------------------------------
   Sidebar — container do plano (fora do sidebar-footer)
   ---------------------------------------------------------------- */

#plano-sidebar-container {
    padding: 0 10px 10px;
}

/* Botão principal (assinar / plano ativo) */
#btn-upgrade {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 7px 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    letter-spacing: 0.2px;
}

#btn-upgrade:hover {
    opacity: 0.88;
}

#btn-upgrade i {
    font-size: 10px;
}

/* Trial banner */
#trial-banner {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.20);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 11px;
    color: #fbbf24;
    display: none;
    flex-direction: column;
    gap: 5px;
}

.trial-banner-top {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 11px;
}

.trial-dias {
    font-size: 10px;
    color: #f59e0b;
    opacity: 0.85;
}

.trial-progress-bar {
    height: 3px;
    background: rgba(245, 158, 11, 0.20);
    border-radius: 2px;
    overflow: hidden;
}

.trial-progress-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* Expirado banner */
#expirado-banner {
    display: none;
    align-items: center;
    gap: 7px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 8px;
    padding: 7px 10px;
    margin-bottom: 6px;
    font-size: 11px;
    color: #f87171;
}

#expirado-banner i {
    font-size: 11px;
    flex-shrink: 0;
}

#expirado-banner span {
    flex: 1;
    font-weight: 600;
}

#expirado-banner button {
    background: rgba(239, 68, 68, 0.20);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 5px;
    color: #f87171;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

#expirado-banner button:hover {
    background: rgba(239, 68, 68, 0.32);
}
