/**
 * Frontend CSS: Calendar Shortcode
 *
 * @package IBCT_Schedule_Manager
 */

.ibct-cal-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: var(--ibct-sm-font, inherit);
    color: var(--ibct-cal-text, #1a1a1a);
}

/* ─── Month & Year Jumpers ─── */
.ibct-cal-jumpers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.ibct-cal-jumpers-months,
.ibct-cal-jumpers-years {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ibct-cal-jumper-btn {
    background-color: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-family: var(--ibct-sm-font, "Poppins", sans-serif);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ibct-cal-jumper-btn:hover {
    background-color: #e5e7eb;
    color: #374151;
}

.ibct-cal-jumper-btn.active {
    background-color: var(--ibct-cal-summary-bg, #fbbf24);
    color: #4b5563; /* slightly darker but readable against yellow */
}

/* ─── Top Header ─── */
.ibct-cal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.ibct-cal-month-title {
    font-family: var(--ibct-sm-font, "Poppins", sans-serif);
    font-weight: 700;
    font-size: 42px;
    line-height: 55px;
    color: rgb(32, 33, 36);
    text-transform: uppercase;
    margin: 0;
}

.ibct-cal-month-nav {
    display: flex;
    gap: 10px;
}

.ibct-cal-container .ibct-cal-nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    padding: 0;
}

.ibct-cal-container .ibct-cal-nav-btn:hover {
    border-color: #333;
    color: #111;
}

.ibct-cal-container .ibct-cal-nav-btn .material-icons {
    font-size: 20px;
}

/* ─── Day Summary (Yellow) ─── */
.ibct-cal-day-summary {
    background-color: var(--ibct-cal-bg, #fbd67e);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
}

.ibct-cal-day-summary-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ibct-cal-day-weekday {
    font-family: var(--ibct-sm-font, "Poppins", sans-serif);
    font-size: 1.1rem;
    text-transform: uppercase;
    color: #333;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.ibct-cal-day-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.ibct-cal-day-number {
    font-family: var(--ibct-sm-font, "Poppins", sans-serif, oswald, "arial narrow");
    font-weight: 700;
    font-size: 120px;
    line-height: 132px;
    color: rgb(32, 33, 36);
}

.ibct-cal-day-nav-wrapper .ibct-cal-nav-btn {
    width: 44px;
    height: 44px;
    border-color: #333;
    color: #222;
}

.ibct-cal-day-nav-wrapper .ibct-cal-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.ibct-cal-day-nav-wrapper .ibct-cal-nav-btn .material-icons {
    font-size: 24px;
}

.ibct-cal-day-events-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ibct-sm-font, "Poppins", sans-serif);
    font-weight: 500;
    text-transform: uppercase;
    color: #555;
    font-size: 0.95rem;
}

.ibct-cal-count-num {
    background-color: #fff;
    color: #555;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 700;
}

/* ─── Days Slider Track ─── */
.ibct-cal-slider-container {
    display: flex;
    align-items: center;
    background-color: var(--ibct-cal-track-bg, #f2f2f2);
    border-radius: 12px;
    padding: 10px 5px;
    margin-bottom: 20px;
    position: relative;
    gap: 10px;
}

.ibct-cal-slider-btn {
    width: 40px;
    height: 60px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    flex-shrink: 0;
}

.ibct-cal-slider-btn:hover {
    color: #333;
}

.ibct-cal-days-track {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 15px 40px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.ibct-cal-days-track::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.ibct-cal-day-card {
    background-color: var(--ibct-cal-day-bg, #fff);
    border-radius: 12px;
    min-width: 65px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.ibct-cal-day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.ibct-cal-day-card.is-active {
    background-color: var(--ibct-cal-active-bg, #1f2937);
    color: var(--ibct-cal-active-text, #fff);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.ibct-cal-card-weekday {
    font-family: var(--ibct-sm-font, "Poppins", sans-serif);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 3px;
    color: #555;
}

.ibct-cal-day-card.is-active .ibct-cal-card-weekday {
    color: #ddd;
}

.ibct-cal-card-num {
    font-family: var(--ibct-sm-font, "Poppins", sans-serif, oswald, "arial narrow");
    font-weight: 700;
    font-size: 24px;
    line-height: 24px;
}

.ibct-cal-card-dots {
    display: flex;
    gap: 3px;
    margin-top: 6px;
    height: 6px;
}

.ibct-cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #38bdf8;
}

/* Multiple events dots colors */
.ibct-cal-dot:nth-child(2) {
    background-color: #4ade80;
}

.ibct-cal-dot:nth-child(3) {
    background-color: #fbbf24;
}

/* ─── Events Container ─── */
.ibct-cal-events-container {
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.ibct-cal-events-header {
    display: none; /* header row hidden – each card is self-contained */
}

.ibct-cal-events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* When collapsed via toggle */
.ibct-cal-events-container.is-collapsed .ibct-cal-events-list {
    display: none;
}

/* ─── Event Card (redesigned) ─── */
.ibct-cal-event-item {
    display: flex;
    align-items: stretch;
    background-color: var(--ibct-cal-event-bg, #c0392b);
    color: var(--ibct-cal-event-text, #fff);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ibct-cal-event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Featured Image */
.ibct-cal-event-image {
    width: 140px;
    flex-shrink: 0;
    padding: 18px 0 18px 18px; /* padding on top, bottom, and left so it sits inside the blue box */
}

.ibct-cal-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px; /* give the image itself rounded corners as in the screenshot */
    display: block;
}

/* Left date badge */
.ibct-cal-event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 20px 16px;
    background-color: rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.ibct-cal-event-date-day {
    font-family: var(--ibct-sm-font, "Poppins", sans-serif);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1;
    color: inherit;
}

.ibct-cal-event-date-month {
    font-family: var(--ibct-sm-font, "Poppins", sans-serif);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    color: inherit;
    opacity: 0.85;
}

/* Right body */
.ibct-cal-event-body {
    flex: 1;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

/* Badges inside card */
.ibct-cal-event-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.ibct-cal-event-badge {
    background-color: var(--ibct-cal-summary-bg, #fbbf24);
    color: #8c5b08;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.ibct-badge-virtual {
    background-color: #262729;
    color: #fff;
}

.ibct-badge-cancelled {
    background-color: #fca5a5;
    color: #991b1b;
    font-family: var(--ibct-sm-font, "Poppins", sans-serif);
}

.ibct-cal-event-cancelled {
    background-color: #B3B3B3; /* Exactly matching the screenshot */
    opacity: 0.85;
}

.ibct-cal-event-cancelled .ibct-cal-event-title {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Title */
.ibct-cal-event-title {
    font-family: var(--ibct-sm-font, "Poppins", sans-serif);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.3;
    text-transform: uppercase;
    margin: 0;
    color: inherit;
}

.ibct-cal-event-title a {
    color: inherit;
    text-decoration: none;
}

.ibct-cal-event-title a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

/* Meta items */
.ibct-cal-event-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
}

.ibct-cal-event-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--ibct-sm-font, "Poppins", sans-serif);
    font-size: 0.88rem;
    color: inherit;
    opacity: 0.92;
}

.ibct-cal-event-meta-item .material-icons {
    font-size: 16px;
    opacity: 0.85;
}

.ibct-cal-event-meta-organizer {
    font-size: 0.82rem;
    margin-top: 2px;
    opacity: 0.85;
}

/* Responsiveness */
@media (max-width: 768px) {
    .ibct-cal-month-title {
        font-size: 1.8rem;
    }

    .ibct-cal-day-number {
        font-size: 4rem;
    }

    .ibct-cal-day-summary {
        padding: 20px;
    }

    .ibct-cal-event-date-badge {
        min-width: 56px;
        padding: 14px 10px;
    }

    .ibct-cal-event-date-day {
        font-size: 1.5rem;
    }

    .ibct-cal-event-body {
        padding: 14px 16px;
    }

    .ibct-cal-event-title {
        font-size: 1rem;
    }

    .ibct-cal-event-image {
        width: 100px; /* smaller width on mobile */
        padding: 14px 0 14px 14px;
    }
}

@media (max-width: 480px) {
    .ibct-cal-event-item {
        flex-direction: column;
    }
    
    .ibct-cal-event-image {
        width: 100%;
        height: 150px;
        padding: 14px 16px 0 16px;
    }
    
    .ibct-cal-event-date-badge {
        flex-direction: row;
        gap: 8px;
        padding-bottom: 0px;
    }
}

/* ─── Empty State ─── */
.ibct-cal-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
    background-color: #f9fafb;
    border-radius: 12px;
    margin-top: 1.5rem;
    border: 1px dashed #e5e7eb;
}

.ibct-cal-empty-state .material-icons {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    display: block;
}

.ibct-cal-empty-state p {
    margin: 0;
    font-size: 1.1rem;
    font-family: var(--ibct-sm-font, "Poppins", sans-serif);
}