/* Stiluri pentru rezervare, autentificare si panoul admin */

.flash {
    padding: 0.9em 1.2em;
    border-radius: 0.6em;
    margin-bottom: 1.5em;
    font-size: 0.9em;
}
.flash-ok    { background: rgba(106, 168, 79, 0.25); border: 1px solid rgba(106, 168, 79, 0.6); }
.flash-error { background: rgba(204, 0, 0, 0.25);   border: 1px solid rgba(204, 0, 0, 0.6); }

/* Formulare auth */
.auth-box {
    max-width: 430px;
    margin: 0 auto;
    background: rgba(238, 217, 185, 0.06);
    border: 1px solid rgba(238, 217, 185, 0.1);
    border-radius: 1em;
    padding: 2em;
}
.auth-box h2 { margin-bottom: 0.75em; }
.auth-box .field { margin-bottom: 1.1em; }
.auth-box label { display: block; font-size: 0.8em; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.4em; }
.auth-alt { margin-top: 1.5em; font-size: 0.85em; color: rgba(238,217,185,0.7); }
.auth-alt a { color: #eed9b9; }
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 0.6em;
    width: 100%; margin-top: 1em;
    background: #ffffff !important; color: #1b1b1b !important;
    box-shadow: none !important;
}
.auth-sep { display: flex; align-items: center; gap: 1em; margin: 1.4em 0; color: rgba(238,217,185,0.5); font-size: 0.8em; }
.auth-sep:before, .auth-sep:after { content: ''; flex: 1; height: 1px; background: rgba(238,217,185,0.2); }

/* Pagina de rezervare: categorii stanga + calendar saptamanal dreapta */
.booking-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 2em;
    background: rgba(238, 217, 185, 0.05);
    border: 1px solid rgba(238, 217, 185, 0.12);
    border-radius: 1.2em;
    padding: 2.2em;
}
.booking-left { display: flex; flex-direction: column; min-width: 0; }
.booking-left h2 { margin-bottom: 0.3em; }
.booking-left .calendar-lead { margin-bottom: 1.4em; }

.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1em; }
.category-card {
    display: flex; flex-direction: column;
    cursor: pointer;
    border: 1px solid rgba(238, 217, 185, 0.15) !important;
    border-radius: 0.9em;
    background: rgba(238, 217, 185, 0.04);
    padding: 0.8em;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    user-select: none;
}
.category-card:hover { background: rgba(238, 217, 185, 0.09); transform: translateY(-2px); }
.category-card:focus-visible { outline: 2px solid #eed9b9; outline-offset: 2px; }
.category-card.selected { border-color: #eed9b9 !important; background: rgba(238, 217, 185, 0.14); }
.category-img {
    position: relative;
    aspect-ratio: 3 / 2;
    border-radius: 0.6em;
    background-size: cover;
    background-position: center;
    margin-bottom: 0.75em;
}
.category-dot {
    position: absolute; top: 0.6em; left: 0.6em;
    width: 12px; height: 12px; border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}
.category-name { font-weight: 700; font-size: 0.95em; line-height: 1.3; }
.category-meta { font-size: 0.72em; color: rgba(238, 217, 185, 0.6); margin: 0.2em 0 0.8em; line-height: 1.4; }
.category-btn {
    margin-top: auto;
    display: block; text-align: center;
    padding: 0.45em 0.6em;
    border-radius: 0.5em;
    background: rgba(238, 217, 185, 0.1);
    font-size: 0.78em;
}
.category-card.selected .category-btn { background: #eed9b9; color: #5e0006; font-weight: 700; }
.category-link .category-btn { background: rgba(238, 217, 185, 0.18); }

.booking-confirm { margin-top: 1.2em; }
.booking-confirm textarea {
    background: rgba(238, 217, 185, 0.08);
    border: 1px solid rgba(238, 217, 185, 0.25);
    border-radius: 0.5em;
    color: #eed9b9;
    width: 100%;
    padding: 0.6em;
}
.booking-actionbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.8em;
    margin-top: 1.2em;
    padding: 0.8em 0.8em 0.8em 1.1em;
    border: 1px solid rgba(238, 217, 185, 0.15);
    border-radius: 0.8em;
    background: rgba(0, 0, 0, 0.15);
}
.booking-summary { flex: 1 1 12em; font-size: 0.82em; color: rgba(238, 217, 185, 0.8); }
.booking-actionbar .button { height: 2.6em; line-height: 2.6em; padding: 0 1.4em; font-size: 0.7em; }
.booking-actionbar .button:disabled { opacity: 0.4; cursor: default; }

.booking-right {
    min-width: 0;
    border: 1px solid rgba(238, 217, 185, 0.12);
    border-radius: 0.9em;
    background: rgba(0, 0, 0, 0.12);
    padding: 1.2em;
    display: flex; flex-direction: column;
}
.week-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: 1em; }
.week-toolbar .calendar-range { font-weight: 700; }
.week-nav { display: flex; gap: 0.4em; }
.week-nav-btn {
    cursor: pointer;
    width: 2.2em; height: 2.2em;
    border-radius: 50%;
    border: 1px solid rgba(238, 217, 185, 0.3);
    background: transparent;
    color: #eed9b9;
    font-size: 1em; line-height: 1;
    padding: 0;
}
.week-nav-btn:hover:not(:disabled) { background: rgba(238, 217, 185, 0.15); }
.week-nav-btn:disabled { opacity: 0.3; cursor: default; }
.week-scroll { overflow-x: auto; flex: 1; }
/* Pe PC (mouse) bara de scroll a saptamanii nu se vede; scroll-ul ramane functional */
@media (hover: hover) and (pointer: fine) {
    .week-scroll { scrollbar-width: none; }
    .week-scroll::-webkit-scrollbar { display: none; }
}
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(4.4em, 1fr)); min-width: 31em; }
.week-grid > .calendar-empty { grid-column: 1 / -1; }
.week-col { border-left: 1px solid rgba(238, 217, 185, 0.08); min-width: 0; }
.week-col:first-child { border-left: 0; }
.week-col-head {
    display: flex; flex-direction: column; align-items: center; gap: 0.2em;
    padding-bottom: 0.6em; margin-bottom: 0.6em;
    border-bottom: 1px solid rgba(238, 217, 185, 0.12);
    text-transform: uppercase;
}
.week-col-name { font-size: 0.65em; letter-spacing: 0.08em; color: rgba(238, 217, 185, 0.6); }
.week-col-num { font-size: 0.95em; font-weight: 700; min-width: 1.8em; text-align: center; border-radius: 0.4em; }
.week-col.is-today .week-col-num { background: #eed9b9; color: #5e0006; }
.week-col-body { display: flex; flex-direction: column; gap: 0.35em; padding: 0 0.3em; }
.week-empty { text-align: center; color: rgba(238, 217, 185, 0.3); font-size: 0.8em; }

/* Intervalele unei zile: liber (click → orele de start) / rezervat / indisponibil */
.seg {
    display: flex; flex-direction: column; align-items: center; gap: 0.1em;
    width: 100%;
    padding: 0.45em 0.2em;
    border-radius: 0.5em;
    font-family: inherit;
    font-size: 0.72em;
    line-height: 1.3;
    text-align: center;
}
.seg-range { font-weight: 700; white-space: nowrap; }
.seg-label { font-size: 0.85em; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.75; }
.seg-free {
    cursor: pointer;
    border: 1px solid rgba(238, 217, 185, 0.4);
    background: rgba(238, 217, 185, 0.1);
    color: #eed9b9;
    transition: background 0.15s;
}
.seg-free:hover:not(:disabled), .seg-free.is-open { background: rgba(238, 217, 185, 0.22); }
.seg-free:disabled { cursor: default; opacity: 0.4; }
.seg-busy {
    border: 1px solid rgba(213, 62, 15, 0.6);
    background: rgba(213, 62, 15, 0.25);
    color: #eed9b9;
}
/* Spatiul dintre butonul de deschidere si cel de inchidere: rezervari + ore de start */
.seg-between {
    display: flex; flex-direction: column; gap: 0.3em;
    margin: 0 0.6em;
    padding: 0.35em 0 0.35em 0.5em;
    border-left: 2px solid rgba(238, 217, 185, 0.25);
}

/* Sloturi */
.slot-btn {
    cursor: pointer;
    width: 100%;
    padding: 0.35em 0.2em;
    border-radius: 0.5em;
    border: 1px solid rgba(238, 217, 185, 0.3);
    background: rgba(238, 217, 185, 0.08);
    color: #eed9b9;
    font-size: 0.75em;
    font-family: inherit;
    transition: background 0.15s;
}
.slot-btn:hover { background: rgba(238, 217, 185, 0.25); }
.slot-btn.selected { background: #eed9b9; color: #5e0006; font-weight: 700; }

/* Calendar restrans (incadrat in inaltimea ecranului) / extins pe tot ecranul */
.booking-right {
    position: relative;
    max-height: calc(100vh - 4.4em);
    max-height: calc(100dvh - 4.4em);
    overflow: hidden;
    cursor: pointer;
}
.week-close { display: none; }
.week-expand-hint {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 3.5em 1em 0.9em;
    text-align: center;
    font-size: 0.75em; letter-spacing: 0.06em; text-transform: uppercase;
    color: #eed9b9;
    background: linear-gradient(to bottom, rgba(94, 0, 6, 0), rgba(94, 0, 6, 0.95) 65%);
    pointer-events: none;
}
.booking-right.is-expanded {
    position: fixed;
    inset: 0;
    z-index: 10010;
    max-height: none;
    border: 0;
    border-radius: 0;
    background: #5e0006;
    overflow-y: auto;
    overscroll-behavior: contain;
    cursor: default;
    padding: 0 1.4em 2em;
}
.booking-right.is-expanded .week-toolbar {
    position: sticky; top: 0; z-index: 1;
    margin: 0 -1.4em 1em; padding: 1em 1.4em 0.8em;
    background: #5e0006;
    border-bottom: 1px solid rgba(238, 217, 185, 0.12);
}
.booking-right.is-expanded .week-close { display: inline-block; }
.booking-right.is-expanded .week-expand-hint { display: none; }
html.calendar-open, html.calendar-open body { overflow: hidden; }

@media screen and (max-width: 1280px) {
    .booking-panel { grid-template-columns: minmax(0, 1fr); }
    .booking-right { max-height: 55vh; max-height: 55dvh; }
}
@media screen and (max-width: 736px) {
    .booking-panel { padding: 1.1em; gap: 1.2em; }
    .category-grid { gap: 0.6em; }
    .booking-right { padding: 0.8em; }
    .booking-right.is-expanded { padding: 0 0.8em 2em; }
    .booking-right.is-expanded .week-toolbar { margin: 0 -0.8em 1em; padding: 0.9em 0.8em 0.7em; }
}

/* Index: "Din studio" — Facebook / Instagram / galerie (dupa modelul Helios) */
.social-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5em; margin-top: 2em; }
.social-col > header { text-align: center; margin-bottom: 2em; }
.social-circle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 4.2em; height: 4.2em;
    border-radius: 50%;
    background: #eed9b9;
    color: #5e0006;
    font-size: 1.3em;
    border-bottom: 0 !important;
}
.social-circle:before { line-height: 1; }
.social-list { list-style: none; padding: 0; margin: 0; }
.social-list > li {
    padding: 1.4em 0;
    border-top: 1px solid rgba(238, 217, 185, 0.15);
    line-height: 1.7;
}
.social-list > li:first-child { border-top: 0; padding-top: 0; }
.social-list .timestamp { font-size: 0.8em; color: rgba(238, 217, 185, 0.45); margin-left: 0.3em; }
.social-empty { color: rgba(238, 217, 185, 0.65); font-size: 0.9em; }
.social-post { display: block; color: inherit; border-bottom: 0 !important; font-size: 0.92em; }
.social-post:hover { color: #ffffff; }
.social-post-img { display: block; width: 100%; max-height: 14em; object-fit: cover; border-radius: 0.4em; margin-bottom: 0.4em; }
.social-post-ig { display: flex; gap: 0.9em; align-items: flex-start; }
.social-thumb { flex: 0 0 4.5em; width: 4.5em; height: 4.5em; object-fit: cover; border-radius: 0.4em; }
.social-more { display: inline-block; margin-top: 0.6em; font-size: 0.8em; color: #eed9b9; }
.studio-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7em; }
.studio-gallery a { display: block; border-bottom: 0 !important; border-radius: 0.4em; overflow: hidden; }
.studio-gallery img {
    display: block; width: 100%; height: auto;
    aspect-ratio: 4 / 3; object-fit: cover;
    transition: transform 0.3s, filter 0.3s;
    filter: saturate(0.9);
}
.studio-gallery a:hover img { transform: scale(1.05); filter: saturate(1.1); }

@media screen and (max-width: 980px) {
    .social-cols { grid-template-columns: minmax(0, 1fr); gap: 3em; }
}

/* Index: blocul contului (nume + Admin/Iesire) */
.account-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6em 1.4em; margin-bottom: 1.2em; }
.account-head h2 { margin: 0; }
.account-actions { margin: 0; }
.account-actions li { padding-left: 0; padding-right: 0.6em; }

/* Tabel rezervari (cont + admin) */
.booking-table { width: 100%; font-size: 0.85em; }
.booking-table th { text-align: left; }
.booking-table td, .booking-table th { padding: 0.55em 0.7em; }
.status-badge {
    display: inline-block; padding: 0.2em 0.7em; border-radius: 999px;
    font-size: 0.75em; text-transform: uppercase; letter-spacing: 0.05em; color: #0f0f0f;
}
.status-pending   { background: #f7e7b2; }
.status-confirmed { background: #cfe7bf; }
.status-paid      { background: #b9d4f0; }
.status-cancelled { background: #e1e1e1; }
.status-expired   { background: #f2b7b7; }

/* Panou admin */
.admin-wrap { max-width: 1150px; margin: 0 auto; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.6em; margin-bottom: 1.6em; }
.admin-nav a {
    padding: 0.45em 1em; border-radius: 999px; font-size: 0.8em;
    border: 1px solid rgba(238,217,185,0.3); text-decoration: none;
}
.admin-nav a.active { background: #eed9b9; color: #5e0006; }
.admin-card {
    background: rgba(238, 217, 185, 0.06);
    border: 1px solid rgba(238, 217, 185, 0.1);
    border-radius: 0.85em;
    padding: 1.4em;
    margin-bottom: 1.5em;
}
.admin-card h3 { margin-bottom: 0.8em; }
.admin-inline-form { display: flex; flex-wrap: wrap; gap: 0.6em; align-items: flex-end; }
.admin-inline-form .field { margin: 0; }
.admin-inline-form label { display: block; font-size: 0.7em; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3em; }
.admin-inline-form input, .admin-inline-form select,
.admin-card input, .admin-card select {
    background: rgba(238, 217, 185, 0.08);
    border: 1px solid rgba(238, 217, 185, 0.25);
    border-radius: 0.4em;
    color: #eed9b9;
    padding: 0.45em 0.6em;
    font-size: 0.85em;
}
.hours-closed { display: none; color: rgba(238, 217, 185, 0.5); font-size: 0.85em; }
.hours-row.is-closed .hours-time { display: none; }
.hours-row.is-closed .hours-closed { display: inline; }
.hours-row.is-closed td:first-child { opacity: 0.6; }
.admin-card input[type="color"] { padding: 0.1em; width: 3em; height: 2.4em; }
.btn-small {
    display: inline-block; cursor: pointer;
    padding: 0.35em 0.9em !important; font-size: 0.75em !important;
    height: auto !important; line-height: 1.8 !important;
}
.btn-danger { box-shadow: inset 0 0 0 2px #cc4444 !important; color: #ff9999 !important; }
