/**
 * kotlr.ai - Estilos de Autenticação
 * Otimizado para funcionamento correto dos modais, formulários e menus de usuário
 */

/* ======= Estilos para Modais ======= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.modal-content {
    position: relative;
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
    animation: modalFadeIn 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-25px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
    background-color: rgba(0, 0, 0, 0.03);
}

.modal-desc {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ======= Botões de Login/Signup ======= */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.9rem 1rem;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.google-btn i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
    color: #4285F4;
}

.google-btn:hover {
    background-color: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-color: #ccc;
}

.google-btn:active {
    transform: translateY(0);
}

/* ======= Consentimento e LGPD ======= */
.consent-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.2rem;
    margin-top: 1rem;
    border: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.consent-container:hover {
    background-color: #f3f4f6;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.consent-checkbox:last-child {
    margin-bottom: 0;
}

.consent-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    margin-right: 0.75rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    border: 1.5px solid #ccc;
    border-radius: 3px;
    width: 18px;
    height: 18px;
    position: relative;
    transition: all 0.2s ease;
}

.consent-checkbox input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.consent-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.consent-checkbox label {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-color);
    flex: 1;
}

.consent-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.consent-checkbox a:hover {
    text-decoration: underline;
}

.consent-info {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* ======= Menu do Usuário ======= */
.user-profile-btn {
    display: none; /* Escondido por padrão, mostrado quando logado */
    align-items: center;
    cursor: pointer;
    padding: 0.35rem 0.6rem 0.35rem 0.35rem;
    border-radius: 40px;
    transition: all 0.2s ease;
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid transparent;
}

.user-profile-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 0.5rem;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.user-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    width: 250px;
    z-index: 100;
    overflow: hidden;
    display: none;
    animation: menuFadeIn 0.25s cubic-bezier(0.19, 1, 0.22, 1);
    transform-origin: top right;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(-5px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.user-menu.active {
    display: block;
}

.user-menu-header {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.user-menu-items {
    padding: 0.5rem 0;
}

.user-menu-item {
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    color: var(--text-color);
    text-decoration: none;
}

.user-menu-item:hover {
    background-color: #f5f5f7;
}

.user-menu-item i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

/* ======= Responsividade ======= */
@media (max-width: 768px) {
    .user-profile-btn {
        padding: 0.35rem;
    }
    
    #user-name {
        display: none;
    }
    
    .user-avatar {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .consent-container {
        padding: 1rem;
    }
    
    .user-menu {
        width: calc(100vw - 20px);
        right: 10px;
    }
    
    .google-btn {
        padding: 0.8rem 1rem;
    }
} 