/* css/register.css */

/* === IMPORT FONTURI === */
@font-face {
    font-family: 'Grotesk';
    src: url('../assets/fonts/grotesk.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* === BASE STYLES === */
* { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    font-family: 'Grotesk', -apple-system, sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
}

.auth-page-wrapper {
    min-height: 100vh; width: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 20px; position: relative;
}

.back-home-link {
    position: absolute; top: 30px; left: 40px;
    text-decoration: none; color: #94a3b8; font-size: 14px; font-weight: 500;
    transition: 0.2s;
}
.back-home-link:hover { color: #1c1c1c; }

.auth-card-center {
    background: #ffffff;
    width: 100%; max-width: 420px;
    padding: 30px;
    border-radius: 30px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.auth-header { text-align: center; margin-bottom: 25px; }
.auth-logo { height: 32px; margin-bottom: 20px; }
.auth-header h1 { font-size: 20px; font-weight: 700; margin: 0 0 5px 0; color: #1c1c1c; }
.auth-header p { font-size: 13px; color: #94a3b8; margin: 0; }


/* ========================================= */
/* === FIX: SELECTOR TIP CONT (FLOAT) ====== */
/* ========================================= */

.account-type-group {
    margin-top: 8px;
    width: 100%;
    overflow: hidden; /* Previne colapsarea containerului din cauza float-urilor */
}

/* Label-ul este cel care plutește și dă dimensiunea */
.account-option {
    float: left;
    width: 50%;         /* 2 pe rând */
    position: relative;
    padding: 5px;       /* Spațiere între butoane */
    cursor: pointer;
}

/* Inputul este invizibil, dar acoperă tot label-ul pentru click */
.account-option input {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

/* Aspectul vizual al butonului (în interiorul label-ului) */
.account-btn {
    display: block;
    width: 100%;
    padding: 12px 5px;
    background: #f8fafc;
    border: 1px solid #e5e5e5;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === STAREA ACTIVĂ (Când inputul este bifat) === */
.account-option input:checked + .account-btn {
    background-color: #1c1c1c;
    color: white;
    border-color: #1c1c1c;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Badge-ul "Gratis" */
.badge-free {
    font-size: 9px;
    background: #22c55e;
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 5px;
    font-weight: 700;
    vertical-align: middle;
}

/* ========================================= */
/* === END FIX ============================= */


/* === ANIMAȚII CÂMPURI DINAMICE === */
.dynamic-section {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out, opacity 0.3s ease-out, margin 0.3s ease;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
}

.dynamic-section.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-bottom: 15px;
}

.dynamic-content {
    min-height: 0;
}

/* === FILE UPLOAD MODERN & PREVIEW === */
.file-drop-area {
    position: relative;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    width: 100%; padding: 20px;
    border: 2px dashed #cbd5e1; border-radius: 20px;
    background-color: #f8fafc; transition: 0.2s;
    text-align: center;
}

.file-drop-area.has-file .default-msg {
    display: none;
}

.file-msg {
    font-size: 12px; color: #64748b; pointer-events: none;
}

.file-input {
    position: absolute; left: 0; top: 0; height: 100%; width: 100%;
    opacity: 0; cursor: pointer; z-index: 5;
}
.file-drop-area.has-file .file-input {
    pointer-events: none;
}

.file-drop-area:hover {
    background-color: #f1f5f9; border-color: #94a3b8;
}

/* Preview Styles */
.file-preview-container {
    display: none;
    width: 100%;
    margin-top: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 10;
}

.file-preview-container.active {
    display: flex;
}

.preview-info {
    display: flex; align-items: center; gap: 10px; overflow: hidden;
}

.preview-thumb {
    width: 40px; height: 40px; object-fit: cover;
    border-radius: 8px; border: 1px solid #cbd5e1;
    background: #fff;
}

.preview-name {
    font-size: 0.85rem; color: #334155; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 140px; text-align: left;
}

.remove-file-btn {
    background: #fee2e2; border: none; color: #ef4444;
    cursor: pointer; font-size: 11px; padding: 6px 10px;
    border-radius: 6px; font-weight: bold; transition: 0.2s;
}
.remove-file-btn:hover { background-color: #fecaca; }

/* === INPUTURI STANDARD === */
.form-group { margin-bottom: 15px; }
.form-group label {
    font-size: 12px; font-family: 'Grotesk', sans-serif;
    color: #475569; margin-left: 10px; margin-bottom: 5px;
    display: block; font-weight: 600;
}

input[type="text"], input[type="email"], input[type="tel"], input[type="password"] {
    width: 100%; padding: 12px 20px;
    border: 1px solid #e2e8f0; border-radius: 25px;
    background: #f8fafc; color: #1c1c1c;
    font-size: 14px; font-family: 'Grotesk', sans-serif;
    outline: none; transition: all 0.2s ease;
}
input:focus {
    background: #ffffff; border-color: #94a3b8;
    box-shadow: 0 0 0 4px rgba(226, 232, 240, 0.5);
}

/* === ALTELE === */
.show-password-wrapper {
    display: flex; align-items: center; margin-top: 8px; margin-left: 10px;
}
.show-password-wrapper label { margin: 0 0 0 8px; font-weight: 500; cursor: pointer; color: #64748b; }
.show-password-wrapper input { cursor: pointer; accent-color: #1c1c1c; }

.terms-group { margin-top: 20px; margin-bottom: 20px; }
.checkbox-container { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox-container input { cursor: pointer; width: 16px; height: 16px; border-radius: 4px; accent-color: #1c1c1c; }
.checkbox-container span { font-size: 12px; color: #64748b; }
.terms-link { color: #1c1c1c; font-weight: 700; text-decoration: none; border-bottom: 1px solid #e2e8f0; }

.submit-btn {
    width: 100%; padding: 14px 20px; background: #1c1c1c; color: white;
    border: none; border-radius: 25px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: opacity 0.2s, transform 0.1s;
}
.submit-btn:hover { opacity: 0.9; }
.submit-btn:active { transform: scale(0.98); }

.auth-footer { text-align: center; margin-top: 25px; font-size: 13px; color: #94a3b8; }
.auth-footer a { color: #1c1c1c; font-weight: 700; text-decoration: none; }
.auth-copyright { margin-top: 40px; font-size: 11px; color: #cbd5e1; }

/* Responsive */
@media (max-width: 600px) {
    .auth-page-wrapper { background: white; padding: 0; }
    .auth-card-center { border: none; box-shadow: none; padding: 20px; padding-top: 80px; border-radius: 0; }
    .back-home-link { top: 20px; left: 20px; }
}
