﻿/* ================================
   style.css - baseado no register.php original
   Comentários explicativos inclusos e design responsivo
================================ */
/* Variáveis para cores e fundos comuns */
:root {
    --bg-dark: rgba(0,0,0,0.6);
    --bg-light: rgba(255,255,255,0.1);
    --primary-color: #ff004c;
    --success-color: #42b72a;
    --focus-color: #1877f2;
}

/* Reset básico e fonte padrão */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

/* Fundo com imagem + overlay escuro */
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* Observação: coloque a imagem em img/Fundo.registro.png */
    background: url('img/bg-swing.png') no-repeat center center/cover;
}

/* Overlay (camada escura sobre a imagem) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    backdrop-filter: blur(2px);
    z-index: -1;
}

/* Container principal do formulário */
.form-container {
    position: relative;
    z-index: 2;
    background: var(--bg-dark);
    padding: 40px;
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

/* animação de entrada */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* títulos */
h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-transform: uppercase;
}

h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 10px;
}

.slogan {
    font-size: 1rem;
    color: #ddd;
    margin-bottom: 20px;
}

/* alertas */
.alerta {
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--primary-color);
}

    .alerta.success {
        color: var(--success-color);
    }

/* inputs */
.input-container {
    position: relative;
    margin: 10px 0;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    background: var(--bg-light);
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

    input[type="password"] {
        padding-right: 40px;
    }

    input:focus, select:focus {
        border-color: var(--focus-color);
        box-shadow: 0 0 10px rgba(24,119,242,0.5);
    }

/* toggle senha (ícone na direita do input) */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ddd;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
    z-index: 3;
    display: block;
}

    .toggle-password:hover {
        transform: translateY(-50%) scale(1.1);
    }

/* botões */
button {
    width: 100%;
    padding: 12px;
    background: var(--focus-color);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
}

    button:hover {
        background: #145db2;
        transform: scale(1.05);
    }

/* nav buttons (prev/next) */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

    .nav-buttons button {
        width: 48%;
    }

    .nav-buttons.single {
        justify-content: center;
    }

/* progress bar */
.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.2);
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.3s ease-in-out;
    border-radius: 5px;
}

/* steps hidden by default */
.step {
    display: none;
}

    .step.active {
        display: block;
    }

/* Classe hidden para elementos ocultos */
.hidden {
    display: none;
}

/* textos, links */
p {
    color: #ddd;
    font-size: 1rem;
    margin-top: 20px;
}

a {
    color: var(--success-color);
    text-decoration: none;
    font-weight: bold;
}

    a:hover {
        text-decoration: underline;
    }

/* preferencias (checkboxes) */
.preferencias {
    text-align: left;
    margin-bottom: 20px;
}

.preferencias-label {
    display: block;
    color: #ddd;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.preferencias-options {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    transition: border-color 0.3s;
}

    .preferencias-options.input-error {
        border-color: red !important;
    }

    .preferencias-options label {
        display: flex;
        align-items: center;
        color: #ddd;
        padding: 8px 0;
        font-size: 1rem;
    }

    .preferencias-options input[type="checkbox"] {
        margin-right: 10px;
        width: 20px;
        height: 20px;
        vertical-align: middle;
    }

/* select custom com svg */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592c.859 0 1.319 1.013.753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

    select option {
        background-color: rgba(0,0,0,0.8);
        color: #fff;
    }

/* responsividade (mobile) */
@media (max-width: 600px) {
    .form-container {
        width: 95%;
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    input[name="data_nascimento"] {
        font-family: monospace;
    }
}

/* Estilos para labels e texto de ajuda */
.label {
    display: block;
    color: #ddd;
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-align: left;
}

.help-text {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 5px;
    display: block;
}

/* input error */
.input-error {
    border-color: red !important;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5) !important;
}

/* Pop-up de erro */
.error-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

    .error-popup.hidden {
        display: none;
    }

.error-content {
    background: var(--bg-dark);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
}

    .error-content p {
        color: var(--primary-color);
        margin-bottom: 15px;
        font-size: 1rem;
    }

.close-popup {
    width: 100%;
    padding: 10px;
    background: var(--focus-color);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

    .close-popup:hover {
        background: #145db2;
    }
