/* ============================================================
   Event modal (homepage popup)
   A premium, Sungrow-branded modal for the active event.
   Scoped with .event-modal to avoid leaking into the site.
   ============================================================ */

.event-modal .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(4, 18, 36, 0.45);
}

.event-modal .modal-dialog {
    max-width: 640px;
}

.event-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(5, 22, 41, 0.62);
    color: #fff;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.event-modal__close:hover {
    background: rgba(5, 22, 41, 0.85);
}

.event-modal__media img {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: cover;
}

.event-modal__body {
    padding: 30px 34px 34px;
}

.event-modal__tag {
    display: inline-block;
    margin: 0 0 12px;
    font-family: var(--title-font);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: #c25600;
}

.event-modal__title {
    margin: 0 0 12px;
    font-family: var(--title-font);
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    line-height: 1.15;
    color: #0a2a4a;
}

.event-modal__caption {
    margin: 0 0 20px;
    font-family: var(--body-font);
    font-size: 0.95rem;
    line-height: 1.6;
    color: #5b7286;
}

.event-modal__meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 22px;
    padding: 16px 18px;
    border: 1px solid #e3eaf2;
    border-radius: 12px;
    background: #f6f9fc;
}

.event-modal__meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--body-font);
    font-size: 0.9rem;
    color: #122a3d;
}

.event-modal__meta-item i {
    flex: 0 0 auto;
    color: #ff7900;
}

.event-modal__fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.event-modal__field input {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--body-font);
    font-size: 0.95rem;
    color: #122a3d;
    background: #fff;
    border: 1px solid #e3eaf2;
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.event-modal__field input::placeholder {
    color: #8b9cb0;
}

.event-modal__field input:focus {
    outline: none;
    border-color: #ff7900;
    box-shadow: 0 0 0 3px rgba(255, 121, 0, 0.16);
}

.event-modal__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 14px 20px;
    font-family: var(--title-font);
    font-weight: 700;
    font-size: 1rem;
    color: #051629;
    background: #ff7900;
    border: 1px solid #ff7900;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.event-modal__cta:hover {
    background: #e96e00;
    border-color: #e96e00;
}

.event-modal__cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.event-modal__msg {
    min-height: 20px;
    margin: 14px 0 0;
    font-family: var(--body-font);
    font-size: 0.9rem;
    line-height: 1.5;
}

.event-modal__msg--success {
    color: #14532d;
}

.event-modal__msg--error {
    color: #c0392b;
}

.event-modal__closed {
    padding: 22px;
    text-align: center;
    border: 1px solid #e3eaf2;
    border-radius: 12px;
    background: #f6f9fc;
    font-family: var(--body-font);
    color: #5b7286;
}

/* ---- Mobile ---- */
@media (max-width: 575.98px) {
    .event-modal__body {
        padding: 24px 20px 26px;
    }

    .event-modal__fields {
        grid-template-columns: 1fr;
    }

    .event-modal__media img {
        max-height: 180px;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .event-modal__cta,
    .event-modal__close {
        transition: none;
    }
}
