/* Event Manager - Frontend Styles */

/* ---- Event Card ---- */
.em-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 400px;
    margin: 1rem 0;
}

.em-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.em-card__image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.em-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.em-card__body {
    padding: 1.5rem;
}

.em-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
}

.em-card__text {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}

/* ---- Event List ---- */
.em-event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.em-no-events {
    text-align: center;
    color: #888;
    padding: 2rem;
}

/* ---- Event Detail ---- */
.em-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.em-detail__title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1rem;
}

.em-detail__text {
    line-height: 1.6;
    color: #333;
    margin-bottom: 2rem;
}

.em-detail__slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.em-slot {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: border-color 0.2s ease;
}

.em-slot:hover {
    border-color: #c5cfd6;
}

.em-slot__label {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 0.5rem;
}

.em-slot__datetime {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

/* ---- Countdown ---- */
.em-countdown {
    background: #eef2f7;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.em-countdown__label {
    display: block;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.em-countdown__timer {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    font-variant-numeric: tabular-nums;
}

.em-cd-days,
.em-cd-hours,
.em-cd-minutes,
.em-cd-seconds {
    display: inline-block;
    min-width: 2em;
    text-align: center;
    background: #fff;
    border-radius: 4px;
    padding: 2px 6px;
    margin: 0 2px;
}

/* ---- Buttons ---- */
.em-btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.4;
}

.em-btn--primary {
    background: #2563eb;
    color: #fff;
}

.em-btn--primary:hover {
    background: #1d4ed8;
    color: #fff;
}

.em-btn--warning {
    background: #f59e0b;
    color: #fff;
}

.em-btn--warning:hover {
    background: #d97706;
    color: #fff;
}

.em-btn--disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
}

/* ---- Modal ---- */
.em-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.em-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.em-modal__content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: em-modal-in 0.2s ease;
}

@keyframes em-modal-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.em-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.em-modal__close:hover {
    color: #333;
}

.em-modal__title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
    color: #1a1a2e;
}

/* ---- Form ---- */
.em-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.em-form__row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.em-form__row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.em-form__row input[type="text"],
.em-form__row input[type="email"],
.em-form__row input[type="tel"] {
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.em-form__row input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.em-form__row--repeat {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.em-form__row--repeat label {
    font-weight: 400;
    font-size: 0.9rem;
}

.em-form__message {
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: none;
}

.em-form__message--success {
    background: #d1fae5;
    color: #065f46;
    display: block;
}

.em-form__message--error {
    background: #fee2e2;
    color: #991b1b;
    display: block;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .em-detail__slots {
        grid-template-columns: 1fr;
    }
    .em-event-list {
        grid-template-columns: 1fr;
    }
    .em-detail__title {
        font-size: 1.5rem;
    }
}
