/* =========================================================
FILE: ambulatoriu.css (FINAL CLEAN - STABIL)
========================================================= */


/* =========================================================
CONTAINER
========================================================= */

.ambulatoriu-page .sectie-compartimente{
    max-width:1200px;
    margin:0 auto;
    padding:40px 20px 60px;
}


/* =========================================================
TITLE
========================================================= */

.ambulatoriu-page .section-title{
    text-align:center;
    margin-bottom:40px;
}


/* =========================================================
MODAL PROGRAMARE (FINAL)
========================================================= */

.modal-programare{
    position:fixed;
    inset:0;

    display:none;
    align-items:center;
    justify-content:center;

    background:rgba(0,0,0,0.5);
    z-index:9999;
}

.modal-programare.active{
    display:flex;
}

.modal-content{
    position:relative;

    background:#fff;
    padding:22px;
    border-radius:12px;

    width:100%;
    max-width:420px;

    box-shadow:0 20px 60px rgba(0,0,0,0.25);
}

.modal-content input{
    width:100%;
    padding:10px;
    margin-bottom:12px;

    border:1px solid var(--border);
    border-radius:8px;
}

.btn-confirmare{
    width:100%;
    background:var(--primary);
    color:#fff;

    padding:10px;
    border-radius:8px;

    border:none;
    font-weight:600;
}


/* =========================================================
CLOSE BUTTON
========================================================= */

.close-modal{
    position:absolute;
    top:12px;
    right:14px;

    width:32px;
    height:32px;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:18px;
    font-weight:bold;

    color:var(--text-light);
    background:#f3f4f6;

    border-radius:50%;
    cursor:pointer;

    transition:.2s;
}

.close-modal:hover{
    background:#e5e7eb;
    color:#111827;
}


/* =========================================================
CARD MEDIC (FINAL)
========================================================= */

.card{
    border-radius:14px;
    padding:20px;
    background:#fff;

    box-shadow:0 6px 20px rgba(0,0,0,0.06);
    transition:all 0.25s ease;

    display:flex;
    flex-direction:column;
}

.card:hover{
    transform:translateY(-5px);
    box-shadow:0 12px 30px rgba(0,0,0,0.12);
}

.medic-functie{
    font-weight:600;
    color:#2c3e50;
}

.medic-badge{
    display:inline-block;
    background:#eef3ff;
    color:#3b5bdb;
    padding:5px 12px;
    border-radius:20px;
    font-size:12px;
}


/* =========================================================
BUTON + ACTIONS
========================================================= */

.btn{
    border-radius:10px;
    padding:10px 14px;
    font-weight:500;
}

.btn-danger{
    background:#e63946;
    border:none;
}

.btn-danger:hover{
    background:#d62828;
}

.medic-actions{
    margin-top:auto;
    display:flex;
    flex-direction:column;
    gap:10px;
}


/* =========================================================
GRID MEDICI
========================================================= */

.medici-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(260px,1fr));
    gap:25px;
}

.medic-card-extended{
    display:flex;
    flex-direction:column;
}


/* =========================================================
PROGRAM ÎN CARD (FINAL)
========================================================= */

.medic-program{
    margin-top:10px;
    padding:10px 12px;

    background:#f8fafc;
    border-radius:10px;

    font-size:13px;
    color:#444;
}

.program-titlu{
    font-weight:600;
    margin-bottom:6px;
    color:#2c3e50;
}

.program-linie{
    display:flex;
    justify-content:space-between;
    padding:2px 0;
}


/* =========================================================
ALERT
========================================================= */

.alert-success-custom{
    text-align:center;
    margin:30px auto;
    max-width:800px;
    padding:18px 20px;

    background:#e6f4ea;
    color:#2e7d32;

    border:1px solid #c8e6c9;
    border-radius:10px;
}


/* =========================================================
FLATPICKR
========================================================= */

.flatpickr-calendar{
    z-index:99999 !important;
    font-size:13px;
    width:300px !important;
}

.flatpickr-day{
    display:flex;
    align-items:center;
    justify-content:center;
    height:34px;
}

.flatpickr-day.selected{
    background:var(--primary);
    border-color:var(--primary);
}


/* =========================================================
DATE INPUT
========================================================= */

.date-input-wrapper{
    position:relative;
}

#data_dorita{
    width:100%;
    padding-right:40px;
    cursor:pointer;
}

.date-icon{
    position:absolute;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    opacity:0.5;
}

/* =========================================================
SLOTURI PROGRAMARE – FINAL CLEAN
========================================================= */

/* GRID SLOTURI */
#programareModal .sloturi-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    max-height: 220px;
    overflow-y: auto;
}

/* BUTON SLOT */
#programareModal .slot-btn {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

/* HOVER */
#programareModal .slot-btn:hover {
    background: #eef3ff;
    border-color: #3b6eea;
}

/* ACTIV */
#programareModal .slot-btn.active {
    background: #3b6eea;
    color: #fff;
    border-color: #3b6eea;
}

/* FIX GRID SLOTURI RAPIDA */
#programareModal #sloturiGridRapidaX {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* FIX BUTOANE */
#programareModal .slot-btn {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

#programareModal .slot-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 4px 10px rgba(37,99,235,0.3);
}

#programareModal .slot-btn {
    transition: all 0.2s ease;
}

