/* ============================= */
/* IMPORTS */
/* ============================= */
@import url("bootstrap.min.css");
@import url("font-awesome.min.css");

/* ============================= */
/* TABLE FULL LINE (NO GAPS) */
/* ============================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
}
html, body {
    height: 100%;
    margin: 0;
}
body {
    background: linear-gradient(135deg, #d1fae5, #a94442, #ecfdf5);
    background-attachment: fixed;
}
#mainContainer {
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 20px;
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.15);
}

[ng-cloak] {
    display: none !important;
}
/* Make panel take full screen */
#screen-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Table takes full height */
.table-responsive {
    flex: 1;
    overflow-y: auto;
}
.prevmonth-days,
.nextmonth-days
{
    visibility: hidden;
}
.modal-header {
    border-bottom: 2px solid green;
    background: gold;
    color: darkred;
}

.modal-footer {
    border-top: 1px solid green;
}
.table {
    table-layout: fixed;
}
.btn {
    border-radius: 0;
    margin-left: 4px;
    font-weight: bold;
    text-transform: uppercase;
}
/* Remove bootstrap padding inside calendar heading */
.row_heading {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.row_heading > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.col_prevnxt {
    text-align: left;
    padding-left: 5px !important;
}

.col-mode {
    text-align: right;
    padding-right: 5px !important;
}
.btn-default {
    border: 1px solid green;
    color: green;
}
/* ============================= */
/* CALENDAR CELL */
.calendar-day {
    height: auto !important;
    padding: 6px;
    vertical-align: top;
}
.timetitle span {
    font-size: 11px; /* adjust size as needed */
}
.scrollable-events {
    max-height: 620px;   /* or whatever fits under calendar */
    overflow-y: auto;
}
.glass-wrapper {
    background: #eee;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}
/* DATE BOX (MAIN BOX STYLE) */
/* ============================= */
.date-box {
    width: 100%;
    height: 100%;
    background: #ffffff;          /* keep date box white */
    border: 2px solid #7519e4;
    border-radius: 16px;
    padding: 8px;
    transition: all 0.3s ease;
}
.date-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.18);
    border: 1px solid #c084fc;
}
.date-box:focus {
    outline: none;
    box-shadow: none;
}
.orange-border {
    background: rgb(255 165 0 / 25%);   /* soft transparent orange */
    border: 2px solid #ffffff !important; /* white border */
}
.booked-border {
    background: rgba(52, 214, 13, 0.25);   /* light transparent green */
         /* glass effect */
    border: 3px solid #ffffff !important; /* white border */                      /* dark green text */
}

.notbooked-border {
    background: white;  /* light transparent red */
    border: 3px solid #cf1919cc !important; /* white border */
}
.calendar-day.today .date-box {
    border: 4px solid #7b1fa2  !important;   /* Dark Orange */
    background: white;
}

.form-group.required .control-label:after {
    content:"*";
    color:red;
    font-size: 22px;
    top: -2px;
    position: absolute;
    padding-left: 2px;
}

.date-number {
    font-size: 22px;
    font-weight: 800;
    color: #6d28d9;
}
.row_week th {
    text-align: center !important;      /* horizontal center */
    vertical-align: middle !important;  /* vertical center */
}
/* Soft hover */
.date-box:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}
/* ============================= */
/* ACTIVE ADD MODE */
/* ============================= */

/* DATE NUMBER */
/* ============================= */
.date-number {
    font-size: 24px;       /* BIG NUMBER */
    font-weight: 800;
    margin-bottom: 8px;
    color: #222;
}


/* PREVIOUS & NEXT MONTH */
/* ============================= */
.prevmonth-days .date-box,
.nextmonth-days .date-box {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
}
.prevmonth-days .date-number,
.nextmonth-days .date-number {
    color: #9e9e9e;
}

.eventweek_datetime td, .eventweek_datetime th {
    border: 1px solid #ccc;       /* light grey border */
    padding: 5px;
    vertical-align: top;
}
/* Week date box for better spacing */
.week-date-box {
    position: relative;
    padding: 5px;
}

/* ============================= */
/* EVENTS */
/* ============================= */

.calendar_event:hover {
    transform: scale(1.03);
}


tbody[ng-if="data.mode === 'month'"] td,
tbody[ng-if="data.mode === 'month'"] th {
    border: none !important;
}

/* HEADER ROWS */
/* ============================= */
.row_heading {
    font-size: 2px;
    font-weight: 800;
}
.row_week {
    height: 70px;
    font-size: 22px;
    font-weight: 700;
}
.row_weekdays {
    height: 80px;
    font-size: 20px;
    font-weight: 700;
}
.row_heading .btn-link {
    font-size: 22px;       /* BIG SIZE */
    font-weight: 800;      /* Bold */
    color: #9a20d0;        /* Green color */
    text-decoration: none;
}
/* YEAR VIEW */
/* ============================= */
.calendar-month {
    height: 160px;
    padding: 20px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    border-radius: 16px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.25s ease;
}
/* Month Event Count */
.calendar-month .calendar_event {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, #2196F3, #1565C0);
    color: #ffffff;
}

@media (min-width: 769px) {

    .calendar-day {
        height: 100px !important;
        padding: 4px !important;
        overflow: hidden;
    }

    /* Lock button size */
    .date-box {
        height: 90% !important;
        width: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* Event area should not grow */
    .date-box > div:nth-child(2) {
        flex: 1;
        overflow: hidden;
    }

    /* Event labels */
    .calendar_event {
        display: inline-block;
        margin-top: 6px;
        padding: 4px 8px;
        font-size: 9px;
        border-radius: 20px;
        color: #fff;
        background: linear-gradient(135deg, #f000ff, #0072ff);
        white-space: nowrap;       /* prevent stretching */
        overflow: hidden;
        text-overflow: ellipsis;

        flex-shrink: 0;   /* 🔥 IMPORTANT */
    }

}
/* RESPONSIVE (MOBILE) */
/* ============================= */
@media (max-width: 768px) {
    .xs-margin-top {
        margin-top: 40px;
    }

    .date-box {
        aspect-ratio: 1 / 1;       /* perfect square */
        width: 100%;
        height: auto !important;   /* allow aspect ratio to control height */
        padding: 6px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow: hidden;
        border-radius: 0;          /* remove rounding */
        box-sizing: border-box;    /* include border in size */
    }
    .date-number {
        font-size: 16px;          /* 🔥 bigger day */
        font-weight: 900;
        text-align: center;
        margin-bottom: 4px;
    }
    .year-mode {
        display: block;
        width: 100vw;
        height: 100vh;
        margin: 0;
        padding: 0;
    }

    .year-mode td {
        flex: 0 0 33.3333%;   /* 3 boxes per row */
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }
    .calendar_event {
        font-size: 10px;
        padding: 1px 3px;
        display: inline-block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .calendar-day.booked > .date-box {
        border: 2px solid #41e419bf !important;
    }

    .calendar-day.notbooked > .date-box {
        border: 2px solid #EF9A9A !important;
    }
    .calendar-day.today .date-box {
        background: #FFF9E6;              /* very soft cream */
        border: 2px solid #FFCC80;        /* soft amber */
        color: #E65100;
    }
    .row_heading {
        font-size: 20px;
    }

    .row_heading .btn-link {
        font-size: 12px;       /* BIG SIZE */
        font-weight: 800;      /* Bold */
        color: #2e7d32;        /* Green color */
        text-decoration: none;
    }
    .row_week,
    .row_weekdays {
        font-size: 8px;     /* smaller weekday text */
        height: 40px;
    }
    /* MOBILE SQUARE CALENDAR FIX */
    /* ============================= */
    .table {
        table-layout: fixed;
    }
    .table-responsive {
        flex: 1;
        overflow-y: auto;   /* ✅ vertical scroll inside calendar */
        overflow-x: hidden;
    }
    /* Make cells square */
    .calendar-day {
        width: 14.28% !important;   /* 7 equal columns */
        padding: 3px !important;
        height: auto !important;
    }
    .row_weekdays td {
        padding: 4px 2px;
        text-align: center;
    }
    html, body {
        height: 100%;
        margin: 0;
        overflow-x: hidden;   /* prevent sideways scroll */
        overflow-y: auto;     /* allow vertical scroll */
    }
}

/* ===== MODERN MODAL DESIGN ===== */

.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* Header */
.modal-header {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border-bottom: none;
    padding: 18px 25px;
}

.modal-header .modal-title {
    font-weight: 600;
    font-size: 18px;
}

.modal-header .close {
    color: #fff;
    opacity: 0.9;
    font-size: 22px;
}

/* Body */
.modal-body {
    padding: 25px;
    background: #f9fafb;
}

/* Form spacing */
.modal-body .form-group {
    margin-bottom: 18px;
}

/* Labels */
.control-label {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}

/* Inputs */
.modal-body .form-control {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: none;
    transition: all 0.2s ease;
    font-size: 13px;
}

.modal-body .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* Footer */
.modal-footer {
    border-top: 1px solid #eee;
    padding: 15px 25px;
    background: #fff;
}

/* Buttons */
.modal-footer .btn {
    border-radius: 8px;
    padding: 6px 16px;
    font-weight: 600;
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.btn-default {
    border: 1px solid #d1d5db;
    background: #fff;
}

/* Modal animation */
.modal.fade .modal-dialog {
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.modal.in .modal-dialog {
    transform: translateY(0);
}

/* Row Layout */
.booking-row {
    border: 1px solid #7519e4;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.booking-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Date Circle */
.date-circle {
    width: 45px;
    height: 45px;
    background: #0ef217;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    margin-right: 15px;
}

/* Event Columns */
.event-col {
    flex: 1;
    font-size: 14px;
    color: #444;
}

/* Event Name Highlight */
.event-name {
    font-weight: 600;
    color: #2c3e50;
}