/* assets/css/calendar.css */
/* Styles for booking/calendar.html */

/* ==========================================================================
   พื้นหลังไดโนเสาร์คอยาว (ตกแต่ง — ไม่รับคลิก ไม่รบกวนปฏิทิน)
   ========================================================================== */

.calendar-page-body {
    position: relative;
}

.calendar-main {
    min-height: 0;
    overflow-x: hidden;
}

.calendar-bg-sauropod {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* วางซ้ายล่างโปร่ง — เนื้อหาปฏิทินอยู่ .calendar-main__inner */
.calendar-bg-sauropod__img {
    position: absolute;
    left: -3%;
    bottom: 3%;
    width: min(28rem, 62vw);
    max-height: min(48vh, 26rem);
    height: auto;
    object-fit: contain;
    object-position: left bottom;
    opacity: 0.12;
    filter: saturate(0.92);
    user-select: none;
    -webkit-user-drag: none;
}

@media (min-width: 768px) {
    .calendar-bg-sauropod__img {
        opacity: 0.13;
        width: min(34rem, 48vw);
        max-height: min(52vh, 30rem);
        left: -2%;
        bottom: 5%;
    }
}

.calendar-main__inner {
    z-index: 1;
}

#calendar {
    background-color: #fff;
}

/* Toolbar padding */
.fc .fc-toolbar {
    padding: 1rem 1.25rem 0.75rem !important;
    gap: 0.5rem;
}

/* Base grid styling */
.fc-theme-standard .fc-scrollgrid {
    border: 1px solid #e4e4e7 !important;
    border-radius: 0.75rem !important;
    border-collapse: collapse !important;
    /* Better for grid lines */
}

/* Ensure all internal borders are consistent and 1px */
.fc-theme-standard td,
.fc-theme-standard th {
    border: 1px solid #e4e4e7 !important;
}

/* List View (Schedule) Refinement */
.fc-list {
    border: 1px solid #e4e4e7 !important;
    border-radius: 1rem !important;
    overflow: hidden;
    background: #fff;
}

.fc-list-day-cushion {
    background-color: #f9fafb !important;
    padding: 1rem !important;
}

.fc-list-day-text,
.fc-list-day-side-text {
    color: #09090b !important;
    /* Remove blue */
    font-weight: 700;
    text-decoration: none !important;
}

/* Fix Vertical Alignment in Rows */
.fc-list-event td {
    padding: 1.25rem 1rem !important;
    vertical-align: middle !important;
}

.fc-list-event-dot {
    border-width: 5px !important;
    margin-top: 0 !important;
    /* Reset default offset */
    display: inline-block !important;
    vertical-align: middle !important;
}

.fc-list-event:hover td {
    background-color: #f4f4f5 !important;
}

.fc .fc-button-primary {
    background-color: transparent !important;
    border-color: #1f2937 !important;
    color: #1f2937 !important;
    text-transform: capitalize;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    box-shadow: none !important;
    transition: all 0.2s ease-in-out;
}

.fc .fc-button-primary:hover {
    background-color: #1f2937 !important;
    color: #ffffff !important;
}

.fc .fc-button-primary:disabled {
    background-color: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: #f3f4f6 !important;
    border-color: #1f2937 !important;
    color: #1f2937 !important;
    box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Adjust radius for button groups */
.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child) {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child) {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    margin-left: 1px;
}

.fc-list-event-time {
    color: #71717a;
    font-weight: 500;
    font-size: 14px;
}

.fc-list-event-title,
.fc-list-event-title b {
    color: #09090b;
    font-weight: 600;
    font-size: 15px;
}

.fc-col-header-cell-cushion {
    color: #09090b !important;
    text-decoration: none !important;
}

.fc-daygrid-day-number {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
}

.fc-day-today {
    background-color: #f0f9ff !important;
}

/* เพิ่ม padding ภายในเซลล์ */
.fc-daygrid-day-frame {
    padding: 4px 6px !important;
}

.fc-daygrid-day-number {
    padding: 4px 6px !important;
}

.fc-event {
    border-radius: 4px;
    padding: 0.15rem 0.25rem;
    margin-top: 1px;
    font-size: 0.75rem;
    cursor: default;
    border: none !important;
}

@media (max-width: 768px) {
    #calendar {
        padding: 0.5rem;
    }

    .fc .fc-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .fc-toolbar-title {
        font-size: 1rem !important;
        width: 100%;
        text-align: center;
        order: -1;
        margin-bottom: 0.75rem !important;
    }

    .fc .fc-button,
    .fc .fc-button-primary {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
    }

    .fc-daygrid-day-number {
        font-size: 0.8rem;
    }
}

.legend-box {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
}

/* ── วันที่ปิดทำการ (อา./จ./วันหยุดพิเศษ) ─────────────────────────── */
.fc-day-disabled {
    background-color: #f5f5f5 !important;
    pointer-events: none;
}

.fc-day-disabled .fc-daygrid-day-number {
    color: #c4c4c6 !important;
    font-weight: 400;
}