/* ========================================
   Estilos dos modais de seleção de plano.
   Inclui loading animado, sucesso, erro e confirmação.
   ======================================== */

/* Modal Base */
.plan-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.plan-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Conteúdo do Modal */
.plan-modal__content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 32px 28px 28px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    color: #111111;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform: scale(0.97) translateY(6px);
    transition: transform 220ms ease, opacity 220ms ease;
    opacity: 0;
}

.plan-modal.is-visible .plan-modal__content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Spinner Animado */
.plan-modal__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top-color: #111827;
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Títulos */
.plan-modal__title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #111111;
    letter-spacing: -0.02em;
}

.plan-modal__subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.55;
}

/* Ícones SVG */
.plan-modal__icon {
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.plan-modal__icon svg {
    width: 24px;
    height: 24px;
    stroke: #111827;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Botões do Modal */
.plan-modal__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.plan-modal__button {
    min-width: 110px;
    padding: 9px 18px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .plan-modal__button:hover {
        background: #f7f8fa;
        border-color: #d1d5db;
    }
}

/* Card Atual */
.plan-card--current {
    border: 2px solid #111111 !important;
    position: relative;
}

.plan-card__current-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #374151;
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
}

/* Card Desabilitado */
.plan-card--disabled {
    opacity: 0.6;
    pointer-events: none;
}

.plan-card__blocked-badge {
    background: #fef2f2;
    color: #dc2626;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 16px;
    text-align: center;
}

/* Botões de Plano */
.btn--current {
    background: #374151 !important;
    color: white !important;
    cursor: default !important;
    border: none !important;
}

.btn--disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    border: none !important;
}

/* Banner Plano Atual */
.current-plan-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #f7f8fa;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px 24px;
    margin-bottom: 32px;
}

.current-plan-banner__icon {
    width: 24px;
    height: 24px;
    background: #111111;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.current-plan-banner a {
    color: #111111;
    text-decoration: none;
    font-weight: 600;
}

.current-plan-banner a:hover {
    text-decoration: underline;
}

/* Aviso/Alert */
.plans-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.plans-alert--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.plans-alert--info p {
    color: #1e40af;
}

.plans-alert--warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
}

.plans-alert--warning p {
    color: #92400e;
}

.plans-alert--danger {
    background: #fef2f2;
    border: 1px solid #fca5a5;
}

.plans-alert--danger p {
    color: #dc2626;
}

.plans-alert span {
    font-size: 20px;
}

.plans-alert p {
    margin: 0;
    font-size: 14px;
}

/* Notice para PF tentando ver PJ */
.plans-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f7f8fa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.plans-notice span {
    font-size: 18px;
}

.plans-notice p {
    margin: 0;
    font-size: 14px;
    color: #374151;
}

/* Tabs único para Dealer */
.plans-tabs-single {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.plans-tabs-single__badge {
    background: #111111;
    padding: 10px 20px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.875rem;
    color: #ffffff;
}
