/* Frontend Styles for REMISI Events Calendar */

.remisi-events-calendar {
    padding: 40px 0;
}

.remisi-events-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 968px) {
    .remisi-events-container {
        grid-template-columns: 1fr;
    }
}

/* Events List Section */
.remisi-events-list-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.remisi-events-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333;
}

.remisi-events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.remisi-events-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Empty state */
.remisi-events-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    gap: 24px;
    min-height: 360px;
    height: 100%;
}

.remisi-events-empty-img {
    width: 340px;
    max-width: 90%;
    height: auto;
    border-radius: 16px;
    object-fit: contain;
    opacity: 0.97;
}

.remisi-events-empty-text {
    font-size: 19px;
    color: #888;
    margin: 0;
    font-weight: 500;
}

.remisi-event-card {
    display: flex;
    gap: 18px;
    align-items: stretch;
    padding: 18px 20px;
    background: #f9f9f9;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #e3e3e3;
}

.remisi-event-card:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #5BB286;
}

/* Circular thumbnail — forced 1:1 for all (default & uploaded) */
.remisi-event-thumb {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.remisi-event-image {
    width: 68px !important;
    height: 68px !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50% !important;
    display: block;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

/* Default REMISI logo fits inside the circle nicely */
.remisi-event-image.is-default {
    object-fit: contain;
    background: #fff;
    padding: 8px;
}

.remisi-event-image.default-logo {
    background: #15063F;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Middle: title + date, vertically centered against the thumbnail */
.remisi-event-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.remisi-event-name {
    font-size: 18px;
    font-weight: 700;
    color: #15063F;
    line-height: 1.3;
}

.remisi-event-date {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

/* Right column: location (top) + flag right below it, top-aligned */
.remisi-event-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.remisi-event-location {
    font-weight: 700;
    color: #15063F;
    font-size: 14px;
    text-align: right;
}

.remisi-event-ribbon {
    display: inline-block;
    padding: 5px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
    white-space: nowrap;
}

.remisi-event-ribbon.upcoming {
    background: #5BB286;
}

.remisi-event-ribbon.today {
    background: #ffffff;
    color: #15063F;
    border: 1.5px solid #e0c200;
}

.remisi-event-ribbon.ended {
    background: #e06363;
}

/* Calendar Section */
.remisi-events-calendar-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.calendar-month-year {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.calendar-nav {
    background: #0073aa;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.calendar-nav:hover {
    background: #005a87;
}

.remisi-calendar-grid {
    display: flex;
    flex-direction: column;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-weekdays div {
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    color: #666;
    padding: 8px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.calendar-day:hover {
    background: #f0f0f0;
}

.calendar-day.other-month {
    color: #ccc;
}

.calendar-day.today {
    background: #0073aa;
    color: #fff;
    font-weight: bold;
}

.calendar-day.has-event {
    background: #d4edda;
    font-weight: bold;
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: #155724;
    border-radius: 50%;
}

.calendar-day.today.has-event::after {
    background: #fff;
}

/* Modal Styles */
.remisi-event-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remisi-event-modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.remisi-event-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.remisi-event-modal-close:hover {
    color: #000;
}

.remisi-event-detail {
    margin-top: 20px;
}

.remisi-event-detail-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.remisi-event-detail-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.remisi-event-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

.remisi-event-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.remisi-event-detail-description {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.remisi-event-detail-description a {
    color: #1a73e8;
    text-decoration: underline;
    word-break: break-word;
}

.remisi-event-detail-description a:hover {
    color: #0c52b8;
}

/* Event Picker Modal */
.remisi-event-picker-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.remisi-event-picker-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.remisi-event-picker-item:hover {
    background: #0073aa;
    color: #fff;
}

.remisi-event-picker-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.remisi-event-picker-info {
    font-size: 14px;
    color: #666;
}

.remisi-event-picker-item:hover .remisi-event-picker-info {
    color: #fff;
}

/* Language Toggle */
.lang-en {
    display: none;
}

html[lang="en"] .lang-id,
html[lang="en-US"] .lang-id {
    display: none;
}

html[lang="en"] .lang-en,
html[lang="en-US"] .lang-en {
    display: inline;
}
