/* Serlib Events - Frontend Styles */

/* ---- Event List Grid ---- */
.serlib-events-list {
    display: grid;
    gap: 24px;
}
.serlib-events-list--cols-1 { grid-template-columns: 1fr; }
.serlib-events-list--cols-2 { grid-template-columns: repeat(2, 1fr); }
.serlib-events-list--cols-3 { grid-template-columns: repeat(3, 1fr); }
.serlib-events-list--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .serlib-events-list--cols-2,
    .serlib-events-list--cols-3,
    .serlib-events-list--cols-4 {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .serlib-events-list--cols-3,
    .serlib-events-list--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---- Event Card ---- */
.serlib-event-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.serlib-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.serlib-event-card__image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16/9;
}
.serlib-event-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.serlib-event-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.serlib-event-card__badge--free {
    background: #10b981;
    color: #fff;
}

.serlib-event-card__content {
    display: flex;
    gap: 14px;
    padding: 16px;
}

.serlib-event-card__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
    padding: 6px 0;
}
.serlib-event-card__day {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: #1e40af;
}
.serlib-event-card__month {
    font-size: 12px;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 600;
}

.serlib-event-card__info {
    flex: 1;
    min-width: 0;
}
.serlib-event-card__title {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.3;
}
.serlib-event-card__title a {
    color: #1f2937;
    text-decoration: none;
}
.serlib-event-card__title a:hover {
    color: #1e40af;
}

.serlib-event-card__meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13px;
    color: #6b7280;
}
.serlib-event-card__meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

.serlib-event-card__price {
    margin-top: 8px;
    font-weight: 700;
    color: #1e40af;
    font-size: 14px;
}

.serlib-events-list__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

/* ---- Calendar ---- */
.serlib-calendar {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}
.serlib-calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #1e40af;
    color: #fff;
}
.serlib-calendar__title {
    margin: 0;
    font-size: 18px;
    text-transform: capitalize;
}
.serlib-calendar__nav {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.serlib-calendar__nav:hover {
    background: rgba(255,255,255,0.3);
}

.serlib-calendar__days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    padding: 10px 0;
    background: #f3f4f6;
    font-weight: 600;
    font-size: 13px;
    color: #4b5563;
}

.serlib-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
}
.serlib-calendar__day {
    min-height: 90px;
    background: #fff;
    padding: 6px;
    position: relative;
}
.serlib-calendar__day--empty {
    background: #f9fafb;
}
.serlib-calendar__day--today {
    background: #eff6ff;
}
.serlib-calendar__day-number {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}
.serlib-calendar__day--today .serlib-calendar__day-number {
    background: #1e40af;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
}
.serlib-calendar__event {
    display: block;
    padding: 2px 6px;
    margin-bottom: 2px;
    background: #dbeafe;
    border-radius: 3px;
    font-size: 11px;
    color: #1e40af;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.serlib-calendar__event:hover {
    background: #bfdbfe;
}

@media (max-width: 768px) {
    .serlib-calendar__day {
        min-height: 60px;
        padding: 4px;
    }
    .serlib-calendar__event {
        font-size: 10px;
        padding: 1px 4px;
    }
}

/* ---- Single Event ---- */
.serlib-event-single__hero {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}
.serlib-event-single__hero img {
    width: 100%;
    height: auto;
    display: block;
}
.serlib-event-single__title {
    font-size: 28px;
    margin: 0 0 16px;
}
.serlib-event-single__details {
    background: #f9fafb;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}
.serlib-event-single__detail {
    padding: 4px 0;
    font-size: 14px;
    color: #374151;
}
.serlib-event-single__detail .dashicons {
    color: #1e40af;
    margin-right: 6px;
    vertical-align: middle;
}
.serlib-event-single__content {
    margin-bottom: 30px;
    line-height: 1.7;
}

/* Gallery */
.serlib-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}
.serlib-gallery__item {
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 4/3;
}
.serlib-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.serlib-gallery__item:hover img {
    transform: scale(1.05);
}

/* Documents */
.serlib-event-single__docs ul {
    list-style: none;
    padding: 0;
}
.serlib-event-single__docs li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.serlib-event-single__docs .dashicons {
    color: #1e40af;
}

/* ---- Forms ---- */
.serlib-form {
    max-width: 600px;
}
.serlib-form__field {
    margin-bottom: 16px;
}
.serlib-form__field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}
.serlib-form__field .required {
    color: #dc2626;
}
.serlib-form__field input[type="text"],
.serlib-form__field input[type="email"],
.serlib-form__field input[type="number"],
.serlib-form__field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}
.serlib-form__field input:focus,
.serlib-form__field select:focus {
    border-color: #1e40af;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30,64,175,0.1);
}

.serlib-form__message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 14px;
}
.serlib-form__message--success {
    background: #d1fae5;
    color: #065f46;
}
.serlib-form__message--error {
    background: #fee2e2;
    color: #991b1b;
}

/* Buttons */
.serlib-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.serlib-btn--primary {
    background: #1e40af;
    color: #fff;
}
.serlib-btn--primary:hover {
    background: #1e3a8a;
    color: #fff;
}
.serlib-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- Ticket Form ---- */
.serlib-tickets-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.serlib-ticket-option {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: border-color 0.2s;
}
.serlib-ticket-option:hover {
    border-color: #93c5fd;
}
.serlib-ticket-option--disabled {
    opacity: 0.5;
    pointer-events: none;
}

.serlib-ticket-option__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.serlib-ticket-option__header h4 {
    margin: 0;
    font-size: 16px;
}
.serlib-ticket-option__price {
    font-size: 18px;
    font-weight: 700;
    color: #1e40af;
}
.serlib-ticket-option__desc {
    color: #6b7280;
    font-size: 13px;
    margin: 0 0 8px;
}
.serlib-ticket-option__discount {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 8px;
}
.serlib-ticket-option__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.serlib-ticket-option__actions label {
    font-weight: 600;
    cursor: pointer;
}
.serlib-ticket-qty {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-align: center;
}
.serlib-ticket-option__available {
    color: #6b7280;
}
.serlib-ticket-option__status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
}
.serlib-ticket-option__status--sold {
    background: #fee2e2;
    color: #991b1b;
}

/* ---- Registration Form ---- */
.serlib-registration-form {
    background: #f9fafb;
    padding: 24px;
    border-radius: 10px;
    margin-top: 24px;
}
.serlib-registration-form h3 {
    margin-top: 0;
}

.serlib-ticket-form {
    margin-top: 24px;
}
.serlib-ticket-form h3 {
    margin-top: 0;
}
