/* css/forms.css */

/* =========================================
   1. CONTENEDORES DE FORMULARIOS (Login & Dashboard)
   ========================================= */
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-md);
}

.login-card {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 450px;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.dashboard-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) 5%;
}

.upload-card {
    background-color: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: var(--space-lg);
}

.back-link {
    align-self: flex-start;
    margin-bottom: var(--space-lg);
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    backdrop-filter: blur(5px);
}

/* =========================================
   2. ELEMENTOS DE ENTRADA (Inputs & Textareas)
   ========================================= */
.input-group {
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background-color: var(--bg-main);
    transition: all var(--transition-fast);
    outline: none;
}

/* Estado de foco: Resalta con el verde pastel */
input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-pastel-green);
    box-shadow: 0 0 0 3px rgba(178, 223, 219, 0.3);
    background-color: var(--bg-card);
}

textarea {
    resize: vertical; /* Permite al usuario hacer más alto el textarea, pero no más ancho */
    min-height: 80px;
}

/* =========================================
   3. BOTONES ESPECÍFICOS DE FORMULARIO
   ========================================= */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
    margin-bottom: var(--space-md);
}

.btn-google:hover {
    background-color: var(--bg-main);
    box-shadow: var(--shadow-sm);
}

.w-full {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
}

/* Divisor "O con tu correo" */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--space-lg) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 var(--space-md);
}

.form-footer {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.form-footer a {
    color: var(--color-pastel-green-hover);
    font-weight: 600;
}

/* =========================================
   4. SUBIDA DE IMÁGENES (Dashboard)
   ========================================= */
.image-upload-section {
    margin-bottom: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-preview-box {
    width: 100%;
    height: 300px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-main);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.image-preview-box:hover {
    border-color: var(--color-pastel-green);
    background-color: var(--color-warm-yellow);
}

.image-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
}

#preview-placeholder {
    color: var(--text-secondary);
    font-weight: 600;
    z-index: 1;
    position: absolute;
}

.hidden-file-input {
    display: none;
}

.mt-10 {
    margin-top: var(--space-md);
}

/* =========================================
   5. BARRA DE PROGRESO
   ========================================= */
#upload-progress {
    margin-bottom: var(--space-md);
}

#upload-progress p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    display: flex;
    justify-content: space-between;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%; /* Esto se actualizará con JS */
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}