/* Wrapper pentru layout 2 coloane */
#add-cal-frame {
    display: flex;
    gap: 20px; /* spațiu între sidebar și main */
}

/* Sidebar fix la scroll */
#add-content {
    width: 350px; /* lățimea dorită */
    position: sticky;
    top: 20px; /* distanța de sus */
    align-self: flex-start; /* să nu se întindă la înălțimea main */
    height: fit-content; /* ocupă doar conținutul */
    background: #f3f3f3; /* optional, fundal */
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Main content ocupă restul spațiului */
#main-filter {
    flex: 1; /* ocupă tot spațiul rămas */
}

#main-filter {
    max-height: 90vh; /* sau cât vrei */
    overflow-y: auto;
}




/* =====================================================
   LAYOUT PRINCIPAL
===================================================== */
#add-cal-frame {
    display: flex;
    padding: 0;
}

.content {
    flex: 1;
    margin: 0;
    padding-top: 60px;
}

/* =====================================================
   SIDEBAR STÂNGA
===================================================== */
#add-content {padding:20px;}
.sidebar {
    flex: 0 0 350px;
    max-width: 350px;
    background: #f1f1f1;
    border-right: 1px solid #ddd;
    padding: 0;
    box-sizing: border-box;
}

.sidebar form {
    width: 100%;
}

/* =====================================================
   FORM – BAZĂ (SIDEBAR)
===================================================== */
.sidebar .form-row { justify-content: space-between;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#main-calendar {display:flex;}
#main-filter {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    flex-direction: column;
    padding:30px 40px; }


.titlu-form {    display: flex;
    justify-content: space-between;
    flex-direction: row;
    flex-wrap: wrap;}
    
.form-gr1 {width:60%; }
.form-gr2 {width:35%;   }
.form-gr4 {width:35%; margin-left: auto; margin-top:14px;}

.sidebar .form-gr {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.sidebar input,
.sidebar select,
.sidebar button {
    width: 100%; height:26px;
    box-sizing: border-box;
    padding: 2px 10px;
    font-size: 12px;
}



/* =====================================================
   PROMO +
===================================================== */
.sidebar .promo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
justify-content: space-between;
}

/* Data 60% + Ora 40% */
.sidebar .promo-row input[name="promo_date"] {
    width: 60%; height: 26px; margin-bottom:8px;
}
.sidebar .promo-row input[name="promo_time"] {
    width: 35%; height: 26px; margin-bottom:8px;
}

/* Restul câte un rând */
.sidebar .promo-row input[name="promo_title"],
.sidebar .promo-row input[name="promo_subtitle"],
.sidebar .promo-row input[name="promo_comment"] {
    width: 100%; margin :8px 0; height:26px;
}
.sidebar .promo-row input[name="promo_link"] {width: 60%; margin :8px 0; height:26px;}
.promo-status {width: 35%; margin-top: -10px; height:26px;}

/* Buton Promo */
.sidebar .promo-row button {height:26px;
    width: 35%;
    margin-left: auto;
    margin-top: 5px;
}
.promo-row {display: flex;
    justify-content: space-between;
    flex-direction: row;
    flex-wrap: wrap;
}

/* =====================================================
   VIZUAL
===================================================== */
.sidebar label {width: 309px;
    font-size: 13px;
    margin-top: 4px;
}

.sidebar h3 {
    margin-top: 0;
    font-size: 16px;
    border-bottom: 1px solid #ddd;
    padding: 10px 0 4px;
}

.add_event {margin-bottom: 30px;
}

/* =====================================================
   CONȚINUT GENERAL (DREAPTA)
===================================================== */
#main-filter table { 
    border-collapse: collapse;
    width: 100%;
    margin-top: 10px;
    font-size: 12px;
}
#main-filter table td:nth-child(4) {text-align: left;   min-width: 200px;   font-weight: 600;}
#main-filter table td:nth-child(5) {text-align: left;   min-width: 120px;   font-weight: 600;}
#main-filter table td:nth-child(6) {text-align: center;   min-width: 120px;   font-weight: 600;}
#main-filter th, td {
    border: 1px solid #ccc;
}

#main-filter th {
    background: #f4f4f4;
    text-align: center;
}

#main-filter .text-cell { cursor: pointer; }
#main-filter .text-center { text-align: center; }

#main-filter td.text-cell a {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
}
#main-filter td.text-cell a:hover {
    color: #d38f1f;
}

#main-filter table tbody tr {
    transition: background-color 0.15s ease;
}
#main-filter table tbody tr:hover {
    background-color: rgba(0,150,255,0.1);
}

/* =====================================================
   MOBILE
===================================================== */
@media (max-width: 1000px) {
    #add-cal-frame {
        flex-direction: column;
    }

    .sidebar {
        max-width: 100%; 
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
}







/* FINAL*/
/* ==============================
   CONȚINUT DREAPTA – WRAPPER
================================ */
#main-filter .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;margin:0;
}
/* ==============================
   FILTRU SUS
================================ */
#main-filter form {
    width: 100%;
    margin-bottom: 8px;
}

/* grup câmp */


/* dimensiuni câmpuri */
#main-filter .form-group input[type="date"] {
    width: 140px; height:26px;
}

#main-filter .form-group select {
    width: 200px; height:26px;
}

/* grup butoane */
#main-filter .form-group:last-child {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

/* butoane */
#main-filter button {
    height: 26px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
}

/* ==============================
   TABEL EVENIMENTE
================================ */


#main-filter th,
#main-filter td {
    border: 1px solid #ccc;
    padding: 6px 10px;
    vertical-align: middle;
}

#main-filter th {
    background: #f4f4f4;
    text-align: center;
    font-weight: 600;
}

/* aliniere text */
#main-filter td.text-center {
    text-align: center;
}

/* link spectacol */
#main-filter td.text-cell a {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
}

#main-filter td.text-cell a:hover {
    color: #d38f1f;
}

/* hover rând */
#main-filter tbody tr {
    transition: background-color 0.15s ease;
}

#main-filter tbody tr:hover {
    background-color: rgba(0,150,255,0.1);
}

/* ==============================
   ACȚIUNI (EDIT / DELETE)
================================ */
#main-filter td form {
    margin: 0;
}

#main-filter td button {
    padding: 1px 6px;
    font-size: 11px;
}
/* ==============================
   RESPONSIVE
================================ */
@media (max-width: 1000px) {
    #main-filter .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    #main-filter .form-group input,
    #main-filter .form-group select {
        width: 100%;
    }
}
