﻿/* _modal-idioma.css */

.modal {
    /* Agora o modal é o fundo que cobre a tela toda */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    /* Para centralizar o conteúdo interno */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    /* Fica acima de tudo */

    /* O Efeito de Blur e cor de fundo semi-transparente */
    background-color: rgba(0, 0, 0, 0.4);

    font-family: var(--montserrat);
    transition: opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    perspective: 1200px;
}

.modal:not(.hidden) {
    animation: premiumModalBackdropIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Quando o modal estiver escondido */
.modal.hidden {
    display: none;
    pointer-events: none;
}

/* Esta classe estiliza o "quadrado" branco onde estão as opções */
.modal-content {
    background-color: var(--white);
    padding: 2.4vw;
    border-radius: 0.9vw;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    max-width: 90%;
    /* Responsividade para telas menores */
    width: min(64vw, 920px);
    border: 0.1vw solid rgba(111, 0, 255, 0.2);
    position: relative;
    transform-origin: 50% 8%;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.36s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.36s ease;
}

.modal:not(.hidden) .modal-content {
    animation: premiumModalContentIn 0.58s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.modal-content.modal-content--plan {
    background-color: var(--white);
    padding: 3vw;
    border-radius: 1.5vw;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 0.1vw solid var(--prata);
    width: 65vw;
    max-height: 45vh;
    overflow-y: auto;
}

.modal-content--plan {
    min-width: 90vw;
    min-height: 40vw;
}

.modal-content.modal-content--plan .plan-modal__title,
.modal-content.modal-content--plan .plan-modal__description,
.modal-content.modal-content--plan .plan-modal__note {
    margin: 0;
}

.modal-content.modal-content--plan .plan-modal__title {
    font-size: clamp(1.6rem, 2.2vw, 2.4rem);
    margin-bottom: 0.75rem;
    color: var(--black);
}

.modal-content.modal-content--plan .plan-modal__description {
    font-size: 1rem;
    line-height: 1.6;
    color: #6F6F80;
    margin-bottom: 1.4rem;
}

.modal-content.modal-content--plan .plan-modal__options {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.modal-content.modal-content--plan .plan-modal__option {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 0.1rem solid rgba(111, 0, 255, 0.12);
    background: rgba(111, 0, 255, 0.03);
    color: var(--black);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    font-size: 0.98rem;
}

.modal-content.modal-content--plan .plan-modal__option:hover {
    transform: translateY(-1px);
    border-color: rgba(111, 0, 255, 0.22);
    background: rgba(111, 0, 255, 0.06);
}

.modal-content.modal-content--plan .plan-modal__option input {
    margin-top: 0.15rem;
    accent-color: #6F00FF;
    width: 1.1rem;
    height: 1.1rem;
}

.modal-content.modal-content--plan .plan-modal__note {
    font-size: 0.95rem;
    color: #6F6F80;
    line-height: 1.5;
    margin-bottom: 1.6rem;
}

.modal-content.modal-content--plan .plan-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.modal-content.modal-content--plan .plan-modal__button {
    min-width: 120px;
    font-weight: 700;
    padding: 0.95rem 1.2rem;
    border-radius: 0.85rem;
}

.modal-content.modal-content--plan .plan-modal__button--ghost {
    background: transparent;
    border: 0.12rem solid rgba(112, 112, 122, 0.2);
    color: var(--black);
}

.modal-content.modal-content--plan .plan-modal__button--primary {
    background: linear-gradient(90deg, #6F00FF 0%, #4F13CB 100%);
    color: var(--white);
    border: none;
}

.modal-content.modal-content--plan .plan-modal__button:hover {
    transform: translateY(-0.08rem);
}

.modal-content.modal-content--plan .plan-modal__button:focus-visible {
    outline: 0.18rem solid rgba(111, 0, 255, 0.24);
    outline-offset: 0.18rem;
}

.modal-content h2 {
    margin-bottom: 0.8vw;
    text-align: left;
    color: var(--black);
    font-family: var(--montserrat);
    font-size: 2.3vw;
    padding-top: 0;
}



.modal-content:not(.modal-content--plan) p {
    color: #808089;
    font-size: 1.08vw;
    line-height: 1.4;
    font-family: var(--montserrat);
}

.language-options {
    display: flex;
    flex-direction: column;
    /* display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); */
    gap: 1vw;
    max-height: 30vw;
    overflow-y: scroll;
    overflow-x: hidden;
}

.idioma-select__button {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: var(--lavender-mist);
    color: var(--black);
    /* Alterado para transparente para o hover ficar melhor */
    border-radius: 0.45vw;
    width: 95%;
    padding: 1vw 2vw;
    /* Adicionado padding para respiro interno */
    gap: 2vw;
    font-weight: 600;
    font-size: 1.06vw;
    cursor: pointer;
    transition: transform 0.28s cubic-bezier(0.2, 0.85, 0.3, 1), box-shadow 0.28s cubic-bezier(0.2, 0.85, 0.3, 1), background-color 0.24s ease, border-color 0.24s ease, color 0.24s ease;
    font-family: var(--montserrat);
    border: 0.1vw solid var(--white);
    position: relative;
    overflow: hidden;
}

.idioma-select__button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(108deg, rgba(255, 255, 255, 0) 16%, rgba(255, 255, 255, 0.32) 48%, rgba(255, 255, 255, 0) 82%);
    transform: translateX(-140%);
    transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.idioma-select__button:hover {
    background-color: #6F00FF;
    transform: translate3d(0, -0.12vw, 0) scale(1.015);
    box-shadow: 0 0.5vw 1.4vw rgba(111, 0, 255, 0.22);
    color: var(--black);
}

.idioma-select__button:hover::after,
.idioma-select__button:focus-visible::after {
    transform: translateX(140%);
}

.idioma-select__button.active,
.plan-select__button.active {
    border-color: #6F00FF;
    box-shadow: 0 0 0 0.18vw rgba(111, 0, 255, 0.18);
}

.img-flag__button {
    width: 2.5vw;
    height: auto;
}

.modal-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#btn-next-step,
#btn-prev-step {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.5vw;
    font-weight: 600;
    font-size: 2vw;
    font-family: var(--poppins);
    width: 5vw;
    border: 0.2vw solid transparent;
    transition: transform 0.24s cubic-bezier(0.2, 0.85, 0.3, 1), box-shadow 0.24s cubic-bezier(0.2, 0.85, 0.3, 1), border-color 0.24s ease, filter 0.24s ease;
    background: #e0e0ff;
    color: black;
    position: relative;
    overflow: hidden;
}

#btn-next-step::after,
#btn-prev-step::after,
#btn-finish-setup::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(106deg, rgba(255, 255, 255, 0) 14%, rgba(255, 255, 255, 0.32) 46%, rgba(255, 255, 255, 0) 78%);
    transform: translateX(-140%);
    transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.btn-nextsetp-icon {
    width: 3vw;
}

#btn-next-step:hover , #btn-prev-step:hover {
    border: 0.2vw solid var(--eletric-indigo);
    filter: brightness(1.05);
    transform: translate3d(0, -0.08vw, 0);
    box-shadow: 0 0.45vw 1vw rgba(111, 0, 255, 0.2);
}

#btn-next-step:hover::after,
#btn-next-step:focus-visible::after,
#btn-prev-step:hover::after,
#btn-prev-step:focus-visible::after,
#btn-finish-setup:hover::after,
#btn-finish-setup:focus-visible::after {
    transform: translateX(140%);
}

/* Garantir que o estado ".hidden" esconda os botões dentro do modal de idioma
   (a regra por id acima tinha maior especificidade que a classe .hidden) */
#language-modal #btn-prev-step.hidden,
#language-modal #btn-next-step.hidden {
    display: none;
}

#btn-finish-setup {
    border: none;
    border-radius: 0.5vw;
    font-weight: 600;
    font-size: 1.2vw;
    font-family: var(--montserrat);
    width: 26vw;
    background-color: #e0e0ff;
    border: 0.2vw solid transparent;
    transition: transform 0.24s cubic-bezier(0.2, 0.85, 0.3, 1), box-shadow 0.24s cubic-bezier(0.2, 0.85, 0.3, 1), border-color 0.24s ease, filter 0.24s ease;
    position: relative;
    overflow: hidden;
}

#btn-finish-setup:hover {
    border: 0.2vw solid var(--eletric-indigo);
    transform: translate3d(0, -0.08vw, 0);
    box-shadow: 0 0.45vw 1vw rgba(111, 0, 255, 0.2);
}

#btn-next-step:active,
#btn-prev-step:active,
#btn-finish-setup:active {
    transform: scale(0.98);
}

#btn-next-step:focus-visible,
#btn-prev-step:focus-visible,
#btn-finish-setup:focus-visible {
    outline: 2px solid rgba(111, 0, 255, 0.45);
    outline-offset: 2px;
}

.img-tema__modal {
    width: 3vw;
}

.plan-step__title {
    text-align: left !important;
    margin-bottom: 0.45vw !important;
    font-size: 2.3vw;
    font-family: var(--montserrat);
}

.plan-step__subtitle {
    color: var(--black);
    text-align: left;
    margin-top: 0;
    font-size: 1.06vw;
    line-height: 1.4;
    font-weight: 500;
    max-width: 42vw;
}

.plan-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15vw;
    align-items: start;
}

.plan-card {
    display: flex;
    flex-direction: column;
    gap: 0.95vw;
    align-items: center;
    position: relative;
    padding-top: 2vw;
    transition: transform 0.3s cubic-bezier(0.2, 0.85, 0.3, 1), box-shadow 0.3s cubic-bezier(0.2, 0.85, 0.3, 1), border-color 0.3s ease;
    padding: 1.5vw;
    border-radius: 0.5vw;
    background-color: var(--white);
    border-top: 0.5vw solid var(--white);
}

.plan-card:hover {
    transform: translate3d(0, -0.26vw, 0);
    box-shadow: 0 1.05vw 2.2vw rgba(43, 24, 89, 0.14);
}

.plan-card__name {
    margin: 0;
    font-size: 1.75vw;
    line-height: 1.1;
    font-family: var(--montserrat);
    width: 100%;
    font-weight: 600;
    color: var(--black);
}

.plan-card__description {
    margin: 0;
    min-height: 2.7vw;
    color: var(--black);
    font-size: 1.03vw;
    line-height: 1.35;
    font-weight: 500;
    padding-bottom: 0;
    
}

.plan-card__price {
    margin: 0;
    font-size: 2.05vw;
    line-height: 1;
    font-family: var(--montserrat);
    font-weight: 600;
    color: var(--black);
}

.plan-card__check-img {
    width: 1.7vw;
    transition: 0.2s;
}

[data-theme="dark"] .plan-card__check-img {
    filter: invert(1);
}

.plan-select__features-list {
    display: flex;
    flex-direction: row;
    gap: 1vw;
}

.plan-card__price span {
    font-size: 1.05vw;
    color: var(--black);
    font-weight: 500;
}

.plan-select__button {
    width: 100%;
    border-radius: 0.42vw;
    border: 0.1vw solid transparent;
    padding: 0.95vw 1vw;
    font-size: 1.06vw;
    font-family: var(--montserrat);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.plan-select__button:hover ~ .plan-card__features-box {
    background-color: var(--eletric-indigo);
}

/* Botão :hover -> Irmão Div -> Filhos da Div */
/* Quando o botão dentro do card sofrer hover, afete os spans e imagens */
.plan-card:has(.plan-select__button:hover) .plan-select__features-list span {
    color: white;
}

.plan-card:has(.plan-select__button:hover) .plan-card__check-img {
    filter: invert(1);
}

.plan-card:has(.plan-select__button:hover) .plan-card__features-title {
    color: white;
    opacity: 1;
}

/* 4. O AJUSTE: Aplica a borda ao PRÓPRIO card */
.plan-card:has(.plan-select__button:hover) {
    border-top: 0.5vw solid var(--eletric-indigo);
}

.plan-select__button:hover {
    transform: translateY(-0.08vw);
    filter: brightness(1.02);
}

.plan-select__button--free {
    background: var(--white);
    border-color: gray;
    color: var(--black);
}

.plan-select__button--paid {
    background: linear-gradient(90deg, #6f00ff 0%, #4f13cb 100%);
    color: white;
}

.plan-select__button.active {
    border-color: var(--eletric-indigo);
    box-shadow: 0 0 0 0.2vw rgba(111, 0, 255, 0.16);
}

.plan-card.plan-card--active .plan-card__features-box {
}

.plan-card__features-box {
    border-radius: 0.42vw;
    background: var(--white);
    padding: 0.8vw 0.85vw;
    width: 100%;
    transition: 0.3s;
}

.plan-card__features-title {
    margin: 0 0 0.8vw;
    font-size: 1.1vw;
    font-family: var(--montserrat);
    font-weight: 500;
    color: var(--gray);
    transition: 0.3s;
}

.plan-select__features {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.42vw;
}

.plan-select__features li {
    font-size: 1.04vw;
    line-height: 1.28;
    font-weight: 500;
    color: #7b7b7b;
    display: flex;
    align-items: center;
}

[data-theme="dark"] .plan-select__features li {
    color: white;
}

.plan-feature-icon {
    color: #8b8b8b;
    font-size: 0.92vw;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    display: inline-block;
}

.btn-secondary {
    background: var(--gradient-purple);
    border: none;
    border-radius: 0.5vw;
    font-family: var(--montserrat);
    color: white;
    transition: 0.3s;
    font-weight: 600;
}

.btn-secondary:hover {
    opacity: 0.7;
}

.plan-select__button.plan-select__button--paid:hover {
    opacity: 0.92;
}

.plan-select__button.plan-select__button--free:hover {
    opacity: 0.78;
}

@keyframes premiumModalBackdropIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes premiumModalContentIn {
    0% {
        opacity: 0;
        transform: translate3d(0, 28px, 0) scale(0.95) rotateX(-6deg);
        filter: blur(2px);
    }

    70% {
        opacity: 1;
        transform: translate3d(0, -2px, 0) scale(1.01) rotateX(0deg);
        filter: blur(0);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1) rotateX(0deg);
        filter: blur(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .modal,
    .modal-content,
    .idioma-select__button,
    .plan-card,
    .plan-select__button {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

.plan-feature-icon--off {
    color: #9a9a9a;
}

@media (min-width: 0) and (max-width: 1000px) {
    .modal-content {
        width: 92vw;
        border-radius: 3.2vw;
        padding: 6vw 5vw;
    }

    .modal-content:not(.modal-content--plan)::before {
        width: 18vw;
        height: 18vw;
        border-width: 0.8vw;
        border-radius: 2.2vw;
        font-size: 8vw;
        margin-bottom: 3vw;
    }

    .modal-content h2 {
        font-size: 8.4vw;
        margin-bottom: 2vw;
    }

    .modal-content:not(.modal-content--plan) p {
        font-size: 4.2vw;
        line-height: 1.4;
    }

    .language-options {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 2vw;
    }

    .modal-content.modal-content--plan {
        width: 94vw;
        border-radius: 4vw;
        padding: 5vw;
    }

    .plan-step__title {
        font-size: 7.8vw;
        margin-bottom: 1.4vw !important;
    }

    .plan-step__subtitle {
        margin-bottom: 5vw;
        font-size: 3.5vw;
        max-width: none;
    }

    .plan-options {
        grid-template-columns: 1fr;
        gap: 4.8vw;
    }

    .plan-card {
        gap: 2.4vw;
        padding: 4vw;
        border-radius: 0.8vw;
    }

    .plan-card__check-img {
        width: 4vw;
    }

    .plan-card__name {
        font-size: 6vw;
    }

    .plan-card__description {
        min-height: auto;
        font-size: 3.7vw;
    }

    .plan-card__price {
        font-size: 6vw;
    }

    .plan-card__price span {
        font-size: 3.6vw;
    }

    .plan-select__button {
        padding: 3.4vw 3vw;
        border-radius: 1.7vw;
        font-size: 3.8vw;
    }

    .plan-card__features-box {
        border-width: 0.24vw;
        border-radius: 1.8vw;
        padding: 3.3vw;
    }

    .plan-card__features-title {
        font-size: 3.8vw;
        margin-bottom: 2.8vw;
    }

    .plan-select__features {
        gap: 1.9vw;
    }

    .plan-select__features li {
        font-size: 3.8vw;
        gap: 1.6vw;
    }

    .plan-feature-icon {
        width: 3.6vw;
        font-size: 3.2vw;
    }

    .idioma-select__button {
        font-size: 3.6vw;
        width: 100%;
        padding: 3vw;
        height: auto;
        min-height: 14vw;
        border-radius: 1.8vw;
        border-width: 0.28vw;
    }
}