/* ibn.ge Events CSS — Phase 3 v2 (TKT-style cards) */

/* ===== PAGE HEADER ===== */
.ibn-events-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.ibn-events-page-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.ibn-events-filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ibn-events-filter-tab {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    background: #fff;
    color: #555;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}

.ibn-events-filter-tab:hover,
.ibn-events-filter-tab.active {
    background: #c8102e;
    border-color: #c8102e;
    color: #fff;
}

/* ===== CARD GRID ===== */
.ibn-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* ===== SINGLE CARD ===== */
.ibn-event-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.ibn-event-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.11);
    transform: translateY(-3px);
    color: inherit;
    text-decoration: none;
}

.ibn-event-card.ibn-event-past {
    opacity: .65;
}

/* Thumbnail link wrapper — MUST be block */
a.ibn-event-card-thumb-link {
    display: block;
    text-decoration: none;
}

/* Thumbnail */
.ibn-event-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #1a1a2e;
}

.ibn-event-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.ibn-event-card:hover .ibn-event-card-thumb img {
    transform: scale(1.04);
}

/* No-image placeholder */
.ibn-event-card-no-thumb {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255,255,255,.45);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-align: center;
    padding: 12px;
}

.ibn-event-card-no-thumb svg {
    opacity: .35;
}

/* Date badge on thumb */
.ibn-event-card-date-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #c8102e;
    color: #fff;
    border-radius: 6px;
    padding: 4px 10px;
    text-align: center;
    line-height: 1.1;
    min-width: 44px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.ibn-event-card-date-day {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

.ibn-event-card-date-month {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Type badge */
.ibn-event-card-type {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 3px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

/* Featured badge */
.ibn-event-card.ibn-event-featured::after {
    content: '⭐ Featured';
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Card body */
.ibn-event-card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ibn-event-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ibn-event-card:hover .ibn-event-card-title {
    color: #c8102e;
}

.ibn-event-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
}

.ibn-event-card-meta-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #777;
}

.ibn-event-card-meta-row svg {
    flex-shrink: 0;
    color: #c8102e;
    opacity: .8;
}

.ibn-event-card-time {
    color: #c8102e;
    font-weight: 600;
    font-size: 12px;
}

/* Card CTA */
.ibn-event-card-cta {
    display: flex;
    gap: 8px;
    padding: 0 16px 14px;
}

.ibn-event-btn {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    cursor: pointer;
    border: none;
    text-align: center;
}

.ibn-event-btn-details {
    background: #f0f4f8;
    color: #333;
    flex: 1;
}
.ibn-event-btn-details:hover { background: #dce3ea; color: #111; }

.ibn-event-btn-register {
    background: #c8102e;
    color: #fff;
    flex: 1;
}
.ibn-event-btn-register:hover { background: #a00d26; color: #fff; }

.ibn-events-empty {
    text-align: center;
    color: #888;
    padding: 50px 0;
    font-size: 15px;
    grid-column: 1/-1;
}

/* ===== COMPACT CALENDAR ===== */
.ibn-events-calendar-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 28px;
}

.ibn-events-calendar-section h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.ibn-events-calendar-wrap {
    font-family: inherit;
}

.ibn-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ibn-cal-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.ibn-cal-nav {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    color: #555;
    transition: background .15s;
    line-height: 1;
    padding: 0;
}

.ibn-cal-nav:hover { background: #f5f5f5; }

/* Calendar grid — compact */
.ibn-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.ibn-cal-dow {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #aaa;
    padding: 4px 0;
    text-transform: uppercase;
}

.ibn-cal-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 12px;
    color: #444;
    background: transparent;
    border: 1px solid transparent;
    transition: background .12s;
    min-height: 30px;
}

.ibn-cal-day.ibn-cal-empty { background: transparent; border-color: transparent; }

.ibn-cal-day.ibn-cal-today {
    background: #fff0f2;
    border-color: #c8102e;
    font-weight: 700;
    color: #c8102e;
}

.ibn-cal-day.ibn-cal-has-event {
    cursor: pointer;
    background: #eef2ff;
    border-color: #c7d2fe;
    font-weight: 600;
}

.ibn-cal-day.ibn-cal-has-event:hover { background: #e0e7ff; }

.ibn-cal-day.ibn-cal-selected {
    background: #c8102e;
    border-color: #c8102e;
    color: #fff;
}

.ibn-cal-dot {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #c8102e;
    border-radius: 50%;
}

.ibn-cal-day.ibn-cal-selected .ibn-cal-dot { background: rgba(255,255,255,.7); }

/* Events popup under calendar */
.ibn-calendar-events {
    margin-top: 12px;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    min-height: 40px;
}

.ibn-cal-events-title {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    margin: 0 0 8px;
}

.ibn-cal-event-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #f8f8f8;
    border-left: 3px solid #c8102e;
    border-radius: 0 5px 5px 0;
    margin-bottom: 6px;
    text-decoration: none;
    color: inherit;
    font-size: 13px;
    transition: background .12s;
}

.ibn-cal-event-item:hover { background: #f0f0f0; }

.ibn-cal-event-time {
    font-size: 11px;
    color: #c8102e;
    font-weight: 700;
    white-space: nowrap;
    min-width: 36px;
}

.ibn-cal-event-name {
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== SINGLE EVENT META ===== */
.ibn-event-single-meta {
    background: #f8f9fa;
    border-left: 4px solid #c8102e;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 0 6px 6px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ibn-event-single-row {
    font-size: 14px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ibn-event-single-row strong {
    min-width: 110px;
    color: #222;
}

/* ===== LIST VIEW (legacy, kept for [ibn_events] without view= ) ===== */
.ibn-events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .ibn-events-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .ibn-events-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .ibn-event-card-title { font-size: 13px; }
    .ibn-event-card-body { padding: 10px 12px 12px; }
}
