/* ========================================
   New Neo Platform Screens
   ======================================== */

.content-hidden { opacity: 0; visibility: hidden; }
.content-visible { opacity: 1; visibility: visible; transition: opacity 0.2s ease-in; }



/* Container Principal */
.new-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    color: var(--theme-text-primary);
    min-height: 100vh !important;
    line-height: 1.5 !important;
    font-size: 16px;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Logo */
.new-container .logo {
    display: block !important;
    margin: unset !important;
    margin-bottom: 24px !important;
    height: 75px !important;
    width: auto !important;
    position: unset !important;
    z-index: unset !important;
    right: unset !important;
    bottom: unset !important;
}

/* Card - Glassmorphism Sutil */
.new-container .card {
    background-color: color-mix(in srgb, var(--theme-background) 35%, transparent) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 36px 32px !important;
    /*width: 100% !important;*/
    max-width: 420px !important;
    min-width: 350px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2) !important;
}

/* Borda no topo do card (usa cor do botão) */
.new-container .card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background-color: var(--theme-button-bg) !important;
}

.new-container .card-icon {
    text-align: center !important;
    margin-bottom: 10px !important;
    margin-top: 8px !important;
}

.new-container .card-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--theme-text-primary) !important;
    text-align: center !important;
    margin-bottom: 8px !important;
}

.new-container .card-subtitle {
    font-size: 14px !important;
    color: var(--theme-text-primary) !important;
    opacity: 0.85 !important;
    text-align: center !important;
    margin-bottom: 28px !important;
    line-height: 1.5 !important;
}
.new-container .card-subtitle p:not(:first-child) {
    margin-top: 15px !important;
}

/* Formulário */
.new-container .form {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
}

.new-container .form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.new-container .form-group:not(:first-child) {
    margin-top: 22px !important;
}

.new-container .form-label {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--theme-text-primary) !important;
}

/* Input Wrapper */
.new-container .input-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.new-container .form-input {
    width: 100% !important;
    height: 48px !important;
    padding: 0 44px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: var(--theme-text-primary) !important;
    background-color: color-mix(in srgb, var(--theme-background) 70%, transparent) !important;
    /*border-width: 1px  !important;
    border-style: solid !important;
    border-color: color-mix(in srgb, var(--theme-text-primary) 20%, transparent) !important;*/
    border: none;
    border-radius: 8px !important;
    outline: none !important;
    transition: border-color 0.2s ease, background-color 0.2s ease !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--theme-text-primary) 20%, transparent);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.new-container .form-input::placeholder {
    color: var(--theme-text-primary) !important;
    opacity: 0.5 !important;
    letter-spacing: 2px !important;
}

.new-container .form-input:focus {
    /*border-width: 2px  !important;
    border-color: var(--theme-button-bg) !important;*/
    background-color: color-mix(in srgb, var(--theme-background) 70%, transparent) !important;
    border-color: var(--theme-button-bg);
    box-shadow: 0 0 7px var(--theme-button-bg);
}

/* Ícones do Input */
.new-container .input-icon {
    position: absolute !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--theme-text-primary) !important;
    opacity: 0.5 !important;
    pointer-events: none !important;
}

.new-container .input-wrapper:focus-within .input-icon {
    color: var(--theme-button-bg ) !important;
    opacity: 1 !important;
}

.new-container .form-input:focus ~ .input-icon,
.new-container .input-wrapper.active .input-icon {
    color: var(--theme-button-bg) !important;
    opacity: 1 !important;
}

.new-container .input-icon-left {
    left: 14px !important;
}

.new-container .input-icon-right {
    right: 14px !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    background: none !important;
    border: none !important;
    padding: 4px !important;
    border-radius: 4px !important;
    transition: opacity 0.2s ease !important;
}

.new-container .input-icon-right:hover {
    opacity: 1 !important;
}

.new-container .input-icon-right:focus {
    outline: none !important;
    opacity: 1 !important;
}

/* Botão Submit */
.new-container .btn-form, .custom-modal .btn-form {
    width: 100% !important;
    height: 48px !important;
    margin-top: 25px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    color: var(--theme-button-text) !important;
    background-color: var(--theme-button-bg) !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: filter 0.2s ease, transform 0.1s ease !important;
}

.new-container .btn-form:hover, .custom-modal .btn-form:hover {
    filter: brightness(1.1) !important;
    box-shadow: 0 0 20px color-mix(in srgb, var(--theme-button-bg) 40%, transparent);
}

.new-container .btn-form:active, .custom-modal .btn-form:active {
    transform: scale(0.98) !important;
}

.new-container .btn-form:focus, .custom-modal .btn-form:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2) !important;
}

.custom-modal .btn-form {
    width: unset !important;
    min-width: 120px !important;
}

/* Botão Secundário */
.new-container .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 300;
    color: var(--theme-text-primary );
    text-decoration: none;
    background-color: transparent;
    border-radius: 8px;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: color-mix(in srgb, var(--theme-text-primary) 20%, transparent) !important;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    font-family: 'Inter', Arial, sans-serif;
    width: 100%;
    box-sizing: border-box;
    margin-top: 20px !important;
}

.new-container .btn-secondary.small {
    font-size: 12px !important;
}

.new-container .btn-secondary:hover {
    background-color: color-mix(in srgb, var(--theme-background) 40%, transparent) !important;
    border-color: var(--theme-button-bg) !important;
}

.new-container .btn-secondary .btn-arrow-left {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.new-container .btn-secondary:hover .btn-arrow-left {
    transform: translateX(-4px);
}

/* Footer */
.new-container .footer {
    margin-top: 32px !important;
    text-align: center !important;
}

.new-container .footer p {
    font-size: 12px !important;
    color: var(--theme-text-primary) !important;
    opacity: 0.6 !important;
}

/* Label row com link à direita */
.new-container .form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.new-container .form-label-row .form-label {
    margin-bottom: 0;
}

/* Divisor "OU CONTINUE COM" */
.new-container .divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: color-mix(in srgb, var(--theme-text-primary) 40%, transparent) !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.new-container .divider::before,
.new-container .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid color-mix(in srgb, var(--theme-text-primary) 20%, transparent);
}

.new-container .divider span {
    padding: 0 16px;
}

/* Botão social (Google) */
.new-container .btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--theme-text-primary);
    background-color: color-mix(in srgb, var(--theme-background) 70%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-text-primary) 20%, transparent);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    font-family: 'Inter', Arial, sans-serif;
}

.new-container .btn-social:hover {
    background-color: color-mix(in srgb, var(--theme-background) 40%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-text-primary) 10%, transparent);
}

/* Link de cadastro */
.new-container .signup-link {
    text-align: center;
    font-size: 13px;
    color: var(--theme-text-primary);
    margin-top: 24px;
}

/* Footer links */
.new-container .footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.new-container .footer-links a {
    font-size: 12px;
    color: color-mix(in srgb, var(--theme-text-primary) 50%, transparent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.new-container .footer-links a:hover {
    color: var(--theme-text-primary);
}

/* ========================================
   Responsividade
   ======================================== */

/* Tablets */
@media screen and (max-width: 768px) {
    .new-container {
        padding: 30px 16px !important;
    }
    
    .new-container .card {
        padding: 32px 24px !important;
        min-width: unset !important;
    }
    
    .new-container .card-title {
        font-size: 22px !important;
    }
    
    .new-container .card-subtitle {
        font-size: 12px !important;
        margin-bottom: 24px !important;
    }
}

/* Mobile */
@media screen and (max-width: 480px) {
    .new-container {
        padding: 20px 16px !important;
        justify-content: flex-start !important;
        padding-top: 40px !important;
    }
    
    .new-container .logo {
        margin-bottom: 20px !important;
    }
    
    .new-container .logo img {
        height: 48px !important;
    }
    
    .new-container .card {
        padding: 28px 20px !important;
        border-radius: 10px !important;
        min-width: unset !important;
    }
    
    .new-container .card-title {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }
    
    .new-container .card-subtitle {
        font-size: 12px !important;
        margin-bottom: 22px !important;
    }
    
    .new-container .form {
        gap: 14px !important;
    }
    
    .new-container .form-label {
        font-size: 12px !important;
    }
    
    .new-container .form-input {
        height: 44px !important;
        font-size: 13px !important;
        padding: 0 40px !important;
        
    }
    
    .new-container .input-icon svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .new-container .input-icon-left {
        left: 12px !important;
    }
    
    .new-container .input-icon-right {
        right: 12px !important;
    }
    
    .new-container .btn-form {
        height: 44px !important;
        font-size: 13px !important;
        /*margin-top: 8px !important;*/
    }
    
    .new-container .footer {
        margin-top: 28px !important;
    }
    
    .new-container .footer p {
        font-size: 11px !important;
    }

    .new-container .footer-links {
        gap: 16px;
    }
    
    .new-container .footer-links a {
        font-size: 12px;
    }
}

/* Mobile pequeno */
@media screen and (max-width: 360px) {
    .new-container .card {
        padding: 24px 16px !important;
        min-width: unset !important;
    }
    
    .new-container .card-title {
        font-size: 19px !important;
    }
    
    .new-container .card-subtitle {
        font-size: 11px !important;
    }
    
    .new-container .form-input {
        height: 42px !important;
        font-size: 12px !important;
        padding: 0 38px !important;
    }
    
    .new-container .btn-form {
        height: 42px !important;
        font-size: 12px !important;
    }
}

/* Altura reduzida (landscape mobile) */
@media screen and (max-height: 600px) {
    .new-container {
        justify-content: flex-start !important;
    }
    
    .new-container .logo {
        margin-bottom: 16px !important;
    }
    
    .new-container .logo img {
        height: 40px !important;
    }
    
    .new-container .card {
        padding: 24px 20px !important;
        min-width: unset !important;
    }
    
    .new-container .card-title {
        font-size: 18px !important;
        margin-bottom: 6px !important;
    }
    
    .new-container .card-subtitle {
        margin-bottom: 18px !important;
        font-size: 12px !important;
    }
    
    .new-container .form {
        gap: 12px !important;
    }
    
    .new-container .btn-form {
        margin-top: 6px !important;
    }
    
    .new-container .footer {
        margin-top: 20px !important;
    }
}


/* ========================================
   Error Summary - Mensagens de Erro
   ======================================== */

.new-container .errorSummary {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    border-radius: 8px !important;
    padding: 16px 20px !important;
    margin-bottom: 20px !important;
}

.new-container .errorSummary p {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #f87171 !important;
    margin: 0 0 10px 0 !important;
}

.new-container .errorSummary ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.new-container .errorSummary ul li {
    font-size: 13px !important;
    color: #f87171 !important;
    padding: 4px 0 !important;
    padding-left: 20px !important;
    position: relative !important;
}

.new-container .errorSummary ul li::before {
    content: '-' !important;
    position: absolute !important;
    left: 6px !important;
    color: #f87171 !important;
}

/* ========================================
   Botão - Estado de Loading
   ======================================== */

.new-container .btn-form.btn-loading {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.new-container .btn-form .spinner {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid transparent !important;
    border-top-color: var(--theme-button-text) !important;
    border-radius: 50% !important;
    animation: spin 0.8s linear infinite !important;
    vertical-align: middle !important;
    margin-right: 8px !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg) !important;
    }
}

.new-container .icon-status {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 18px !important;
}

.new-container .icon-success {
    color: var(--theme-button-bg) !important;
}

.new-container .icon-error {
    color: #ef4444 !important;
}

/* Botão com seta */
.new-container .btn-with-arrow {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
}

.new-container .btn-with-arrow svg {
    flex-shrink: 0 !important;
    transition: transform 0.2s ease !important;
}

.new-container .btn-with-arrow:hover svg {
    transform: translateX(4px ) !important;
}

/* Code Inputs - 6 dígitos */
.new-container .code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.new-container .code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: var(--theme-text-primary );
    background-color: color-mix(in srgb, var(--theme-background) 70%, transparent) !important;
    /*border: 1px solid var(--theme-input-border, rgba(255, 255, 255, 0.1));
    border-width: 1px !important;
    border-style: solid !important;
    border-color: color-mix(in srgb, var(--theme-text-primary) 20%, transparent) !important;*/
    border: none;
    border-radius: 8px !important;
    outline: none !important;
    transition: border-color 0.2s ease, background-color 0.2s ease !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--theme-text-primary) 20%, transparent);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    font-family: 'Inter', Arial, sans-serif;
}

.new-container .code-input:focus {
    /*border-color: var(--theme-button-bg) !important;
    background-color: color-mix(in srgb, var(--theme-background) 70%, transparent) !important;*/
    background-color: color-mix(in srgb, var(--theme-background) 70%, transparent) !important;
    border-color: var(--theme-button-bg);
    box-shadow: 0 0 7px var(--theme-button-bg);
}

.new-container .code-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Reenviar código */
.new-container .resend-code {
    text-align: center;
    font-size: 12px;
    color: var(--theme-text-primary);
}
.new-container .resend-code span {
    color: color-mix(in srgb, var(--theme-text-primary) 50%, transparent) !important;
}

.new-container .link-accent {
    color: var(--theme-button-bg);
    text-decoration: none;
    font-weight: 300;
    transition: opacity 0.2s ease;
    font-size: 14px;
}

.new-container .link-accent:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Responsivo */
@media (max-width: 480px) {
    .new-container .code-inputs {
        gap: 6px;
    }
    
    .new-container .code-input {
        width: 42px;
        height: 52px;
        font-size: 20px;
    }
}

@media (max-width: 360px) {
    .new-container .code-input {
        width: 38px;
        height: 48px;
        font-size: 18px;
    }
}


/* ============================================
   CUSTOM ALERT
============================================ */

.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: color-mix(in srgb, var(--theme-background) 70%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
}

.custom-alert-overlay.active {
    display: flex !important;
}

.custom-alert-box {
    background: var(--theme-background);
    border-radius: 16px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px color-mix(in srgb, var(--theme-background) 70%, transparent);
    border: 1px solid rgba(255, 255, 255, 0.15);  /* Borda cinza clara */
    overflow: hidden;  /* Para a borda do topo não vazar */
}

/* Borda colorida no topo - usando pseudo-elemento */
.custom-alert-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

/* Borda topo - Error (vermelho) */
.custom-alert-box.error::before {
    background: #ff3b3b;
}

/* Borda topo - Success (verde) */
.custom-alert-box.success::before {
    background: #1ebca5;
}

/* Borda topo - Info (azul) */
.custom-alert-box.info::before {
    background: #3b82f6;
}

/* Tipos - Borda do box */
.custom-alert-box.error {
    border: 1px solid rgba(255, 59, 59, 0.3);
}

.custom-alert-box.success {
    border: 1px solid rgba(30, 188, 165, 0.3);
}

.custom-alert-box.info {
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Remove as bordas coloridas antigas do box */
.custom-alert-box.error,
.custom-alert-box.success,
.custom-alert-box.info {
    border: 1px solid rgba(255, 255, 255, 0.15);  /* Todas usam a mesma borda cinza */
}

.custom-alert-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #666;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.custom-alert-close:hover {
    color: #fff;
}

/* Ícone base */
.custom-alert-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

/* Ícone - Error (vermelho) */
.custom-alert-icon.error {
    background: transparent;
    border: 1px solid rgba(255, 59, 59, 0.5);  /* Borda fina com alpha */
    color: #ff3b3b;
    animation: custom-alert-pulse-error 2s infinite;
}

@keyframes custom-alert-pulse-error {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(255, 59, 59, 0); }
}

/* Ícone - Success (verde) */
.custom-alert-icon.success {
    background: transparent;
    border: 1px solid rgba(30, 188, 165, 0.5);
    color: #1ebca5;
    animation: custom-alert-pulse-success 2s infinite;
}

@keyframes custom-alert-pulse-success {
    0%, 100% { box-shadow: 0 0 0 0 rgba(30, 188, 165, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(30, 188, 165, 0); }
}

/* Ícone - Info (azul) */
.custom-alert-icon.info {
    background: transparent;
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #3b82f6;
    animation: custom-alert-pulse-info 2s infinite;
}

@keyframes custom-alert-pulse-info {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
}

.custom-alert-title {
    color: var(--theme-text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 12px;
}

.custom-alert-message {
    color: color-mix(in srgb, var(--theme-text-primary) 70%, transparent);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 20px;
}

/* Detalhes - Error */
.custom-alert-details {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    text-align: left;
    display: none;
}

.custom-alert-details.active {
    display: block;
}

.custom-alert-details.error {
    background: rgba(255, 59, 59, 0.1);
    border: 1px solid rgba(255, 59, 59, 0.2);
}

.custom-alert-details.error code {
    color: #ff6b6b;
}

.custom-alert-details.success {
    background: rgba(30, 188, 165, 0.1);
    border: 1px solid rgba(30, 188, 165, 0.2);
}

.custom-alert-details.success code {
    color: #1ebca5;
}

.custom-alert-details.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.custom-alert-details.info code {
    color: #3b82f6;
}

.custom-alert-details code {
    font-family: monospace;
    font-size: 0.9rem;
}

/* Botão base */
.custom-alert-btn {
    width: 100%;
    padding: 16px 32px;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-alert-btn:hover {
    color: #fff !important;
}

/* Botão - Error */
.custom-alert-btn.error {
    background: #ff3b3b;
}

.custom-alert-btn.error:hover {
    background: #ff5252;
}

/* Botão - Success */
.custom-alert-btn.success {
    background: #1ebca5;
}

.custom-alert-btn.success:hover {
    background: #22d3b5;
}

/* Botão - Info */
.custom-alert-btn.info {
    background: #3b82f6;
}

.custom-alert-btn.info:hover {
    background: #5b9aff;
}

/* Outras customizações */
[class^="hfloatWindow"] .hfloatContent > .pa {
    color: #000000 !important;
}

[class^="hfloatWindow"] {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.new-container .content-none { display: none !important; }


/* ============================================
   CUSTOM MODAL - CSS
   ============================================ */

.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.2s, opacity 0.2s ease;
}

.custom-modal.open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

/* Overlay */
.custom-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background-color: rgba(0, 0, 0, 0.7);*/
    background-color: color-mix(in srgb, var(--theme-background) 70%, transparent);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Container */
.custom-modal-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: 90vh;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dialog */
.custom-modal-dialog {
    background-color: var(--theme-background);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-height: calc(90vh - 32px);
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.2s ease;
    border: 1px solid color-mix(in srgb, var(--theme-text-primary) 10%, transparent);
}

.custom-modal.open .custom-modal-dialog {
    transform: scale(1) translateY(0);
}

/* Tamanhos */
.custom-modal-sm {
    max-width: 400px;
}

.custom-modal-md {
    max-width: 560px;
}

.custom-modal-lg {
    max-width: 800px;
}

.custom-modal-xl {
    max-width: 1140px;
}

.custom-modal-full {
    max-width: calc(100% - 32px);
    max-height: calc(100vh - 32px);
}

/* Header */
.custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid color-mix(in srgb, var(--theme-text-primary) 10%, transparent);
    flex-shrink: 0;
}

.custom-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--theme-text-primary);
}

.custom-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: color-mix(in srgb, var(--theme-text-primary) 50%, transparent);
    cursor: pointer;
    transition: all 0.15s ease;
}

.custom-modal-close:hover {
    background-color: color-mix(in srgb, var(--theme-text-primary) 10%, transparent);
    color: #ffffff;
}

.custom-modal-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-text-primary) 50%, transparent);
}

/* Body */
.custom-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    color: color-mix(in srgb, var(--theme-text-primary) 80%, transparent);
    font-size: 14px;
    line-height: 1.6;
}

.custom-modal-body h1,
.custom-modal-body h2,
.custom-modal-body h3,
.custom-modal-body h4 {
    color: #ffffff;
    margin-top: 24px;
    margin-bottom: 12px;
}

.custom-modal-body h1:first-child,
.custom-modal-body h2:first-child,
.custom-modal-body h3:first-child,
.custom-modal-body h4:first-child {
    margin-top: 0;
}

.custom-modal-body p {
    margin-bottom: 12px;
}

.custom-modal-body ul,
.custom-modal-body ol {
    margin-bottom: 12px;
    padding-left: 24px;
}

.custom-modal-body li {
    margin-bottom: 6px;
}

.custom-modal-body a {
    color: #1ebca5;
    text-decoration: none;
}

.custom-modal-body a:hover {
    text-decoration: underline;
}

/* Footer */
.custom-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid color-mix(in srgb, var(--theme-text-primary) 10%, transparent);
    flex-shrink: 0;
}

/* Loading */
.custom-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
}

.custom-modal-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #1ebca5;
    border-radius: 50%;
    animation: modal-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes modal-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error */
.custom-modal-error {
    text-align: center;
    padding: 40px;
    color: #ef4444;
}

/* Scrollbar customizada */
.custom-modal-body::-webkit-scrollbar {
    width: 8px;
}

.custom-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.custom-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.custom-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsivo */
@media (max-width: 640px) {
    .custom-modal-container {
        padding: 8px;
        align-items: flex-end;
    }

    .custom-modal-dialog {
        max-height: calc(100vh - 16px);
        border-radius: 16px 16px 0 0;
    }

    .custom-modal-sm,
    .custom-modal-md,
    .custom-modal-lg,
    .custom-modal-xl {
        max-width: 100%;
    }

    .custom-modal-header {
        padding: 14px 16px;
    }

    .custom-modal-body {
        padding: 16px;
    }

    .custom-modal-footer {
        padding: 14px 16px;
        flex-direction: column;
    }

    .custom-modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}


/* Wrapper do botão Google */
.google-btn-wrapper {
    position: relative;
    width: 100%;
    height: 48px;
}

/* Overlay invisível do botão real do Google */
.google-btn-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0.011 !important;
    z-index: 10 !important;
    overflow: hidden !important;
}

.google-btn-overlay iframe,
.google-btn-overlay > div {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
}