/* ============================================================
   BuddyBoss MEC RSVP – Stylesheet v1.1.0
   Design: Facebook-inspirierte Akzentfarben, clean & modern
   ============================================================ */

/* ── Variablen ─────────────────────────────────────────────── */
:root {
    --bbrsvp-blue:        #4267B2;
    --bbrsvp-green:        #22a84a;
    --bbrsvp-red:         #fa3e3e;
    --bbrsvp-grey:        #dddfe2;
    --bbrsvp-text:        #1c1e21;
    --bbrsvp-text-light:  #606770;
    --bbrsvp-bg:          #ffffff;
    --bbrsvp-bg-muted:    #f5f6f7;
    --bbrsvp-radius:      12px;
    --bbrsvp-shadow:      0 2px 8px rgba(0, 0, 0, .10);
    --bbrsvp-font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --bbrsvp-transition:  180ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── Login-Hinweis (kontextuell) ───────────────────────────── */
.bbrsvp-login-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 24px 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #fff8f0 100%);
    border: 1px solid #c5d0f0;
    border-radius: var(--bbrsvp-radius);
    font-family: var(--bbrsvp-font);
    margin: 20px 0;
}

.bbrsvp-login-notice__icon {
    font-size: 32px;
    line-height: 1;
}

.bbrsvp-login-notice__text {
    font-size: 15px;
    color: var(--bbrsvp-text);
    margin: 0;
    line-height: 1.5;
    max-width: 380px;
}

.bbrsvp-login-notice__btn {
    display: inline-block;
    margin-top: 4px;
    padding: 10px 24px;
    background: var(--bbrsvp-blue);
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background var(--bbrsvp-transition), transform var(--bbrsvp-transition);
}

.bbrsvp-login-notice__btn:hover {
    background: #365899;
    transform: translateY(-1px);
}

.bbrsvp-login-notice__btn:active {
    transform: scale(0.97);
}

/* ── Status-Box ────────────────────────────────────────────── */
.bbrsvp-box {
    background: var(--bbrsvp-bg);
    padding: 20px;
    border-radius: var(--bbrsvp-radius);
    border: 2px solid var(--bbrsvp-grey);
    box-shadow: var(--bbrsvp-shadow);
    margin: 25px 0;
    font-family: var(--bbrsvp-font);
    transition: border-color var(--bbrsvp-transition);
}

.bbrsvp-box__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.bbrsvp-box__title {
    font-weight: 700;
    color: var(--bbrsvp-text);
    font-size: 15px;
}

.bbrsvp-box__icon {
    font-size: 20px;
}

/* ── Erfolgsmeldung ────────────────────────────────────────── */
.bbrsvp-message {
    display: none;
    background: var(--bbrsvp-blue);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 14px;
    font-weight: 600;
    font-size: 14px;
    animation: bbrsvp-fade-out 3s forwards;
}

.bbrsvp-message.is-error {
    background: var(--bbrsvp-red);
}

.bbrsvp-message.is-visible {
    display: block;
}

@keyframes bbrsvp-fade-out {
    0%   { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

/* ── Dropdown ──────────────────────────────────────────────── */
.bbrsvp-select-wrapper {
    position: relative;
    margin-bottom: 14px;
}

.bbrsvp-select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid #ccd0d5;
    background: var(--bbrsvp-bg-muted);
    font-weight: 600;
    color: #4b4f56;
    font-size: 15px;
    font-family: var(--bbrsvp-font);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: menulist;
    transition: border-color var(--bbrsvp-transition), box-shadow var(--bbrsvp-transition);
}

.bbrsvp-select:focus {
    outline: none;
    border-color: var(--bbrsvp-blue);
    box-shadow: 0 0 0 3px rgba(66, 103, 178, .20);
}

/* ── Zähler ────────────────────────────────────────────────── */
.bbrsvp-counts {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.bbrsvp-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bbrsvp-text-light);
    transition: color var(--bbrsvp-transition);
}

.bbrsvp-count--dabei      { color: var(--bbrsvp-blue); }
.bbrsvp-count--vielleicht { color: var(--bbrsvp-green); }
.bbrsvp-count--nicht_dabei{ color: var(--bbrsvp-red); }

.bbrsvp-count__num {
    font-size: 15px;
    font-weight: 700;
}

/* ── Footer ────────────────────────────────────────────────── */
.bbrsvp-box__footer {
    border-top: 1px solid #dadde1;
    padding-top: 10px;
    margin-top: 4px;
}

.bbrsvp-box__info {
    font-size: 13px;
    color: var(--bbrsvp-text-light);
    margin: 0;
    line-height: 1.5;
}

/* ── Kompakter Zähler [event_rsvp_counter] ─────────────────── */
.bbrsvp-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--bbrsvp-font);
    font-size: 14px;
    flex-wrap: wrap;
}

.bbrsvp-counter__item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.bbrsvp-counter__item--dabei       { color: var(--bbrsvp-blue); }
.bbrsvp-counter__item--vielleicht  { color: var(--bbrsvp-green); }
.bbrsvp-counter__item--nicht_dabei { color: var(--bbrsvp-red); }

.bbrsvp-counter__label {
    font-weight: 400;
    color: var(--bbrsvp-text-light);
}

.bbrsvp-counter__sep {
    color: var(--bbrsvp-grey);
}

/* ── Dashboard ─────────────────────────────────────────────── */
.bbrsvp-dashboard {
    font-family: var(--bbrsvp-font);
    margin: 20px 0;
}

.bbrsvp-dashboard__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--bbrsvp-text);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bbrsvp-grey);
}

/* Leerer Zustand */
.bbrsvp-dashboard__empty {
    text-align: center;
    padding: 40px 20px;
    background: var(--bbrsvp-bg-muted);
    border-radius: var(--bbrsvp-radius);
    color: var(--bbrsvp-text-light);
}

.bbrsvp-dashboard__empty-icon {
    display: block;
    font-size: 40px;
    margin-bottom: 12px;
}

.bbrsvp-dashboard__empty-hint {
    font-size: 13px;
    margin-top: 6px;
}

/* Event-Liste */
.bbrsvp-dashboard__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bbrsvp-dashboard__item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bbrsvp-bg);
    border: 1px solid var(--bbrsvp-grey);
    border-left: 4px solid var(--bbrsvp-grey);
    border-radius: var(--bbrsvp-radius);
    padding: 14px 16px;
    box-shadow: var(--bbrsvp-shadow);
    transition: box-shadow var(--bbrsvp-transition), transform var(--bbrsvp-transition), opacity var(--bbrsvp-transition);
}

.bbrsvp-dashboard__item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
    transform: translateY(-1px);
}

.bbrsvp-dashboard__item--dabei      { border-left-color: var(--bbrsvp-blue); }
.bbrsvp-dashboard__item--vielleicht { border-left-color: var(--bbrsvp-green); }

/* Abgelaufene Events: blass und gedimmt */
.bbrsvp-dashboard__item--past {
    opacity: 0.45;
    filter: grayscale(40%);
    border-left-color: var(--bbrsvp-grey) !important;
}

.bbrsvp-dashboard__item--past:hover {
    opacity: 0.70;
    filter: grayscale(0%);
}

/* Entfernen-Animation */
.bbrsvp-dashboard__item--removing {
    opacity: 0 !important;
    transform: translateX(30px) scale(0.97) !important;
    transition: opacity 250ms ease, transform 250ms ease !important;
    pointer-events: none;
}

.bbrsvp-dashboard__item-status {
    font-size: 22px;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.bbrsvp-dashboard__item-body {
    flex: 1;
    min-width: 0;
}

.bbrsvp-dashboard__item-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--bbrsvp-text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    transition: color var(--bbrsvp-transition);
}

.bbrsvp-dashboard__item-title:hover {
    color: var(--bbrsvp-blue);
}

.bbrsvp-dashboard__item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bbrsvp-dashboard__item-date {
    font-size: 13px;
    color: var(--bbrsvp-text-light);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bbrsvp-dashboard__item-time {
    margin-left: 6px;
    color: var(--bbrsvp-text-light);
}

/* Status-Badges */
.bbrsvp-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.bbrsvp-badge--dabei {
    background: rgba(66, 103, 178, .12);
    color: var(--bbrsvp-blue);
}

.bbrsvp-badge--vielleicht {
    background: rgba(34, 168, 74, .12);
    color: #1a7a38;
}

.bbrsvp-badge--past {
    background: rgba(0, 0, 0, .07);
    color: var(--bbrsvp-text-light);
    font-weight: 600;
}

/* Aktions-Buttons */
.bbrsvp-dashboard__item-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bbrsvp-dashboard__item-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bbrsvp-bg-muted);
    color: var(--bbrsvp-text-light);
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    transition: background var(--bbrsvp-transition), color var(--bbrsvp-transition);
}

.bbrsvp-dashboard__item-link:hover {
    background: var(--bbrsvp-blue);
    color: #fff;
}

/* Löschen-Button (nur bei abgelaufenen Events).
   Der Button ist absichtlich aus der Opacity-Verblassung herausgenommen,
   damit er auch bei gedimmten Einträgen klar erkennbar bleibt. */
.bbrsvp-dashboard__item-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--bbrsvp-red);
    background: #fff;
    color: var(--bbrsvp-red);
    font-size: 17px;
    cursor: pointer;
    /* Aus der Eltern-Opacity herausnehmen: eigene opacity auf 1 erzwingen */
    opacity: 1 !important;
    filter: none !important;
    position: relative;
    z-index: 2;
    transition: background var(--bbrsvp-transition), color var(--bbrsvp-transition),
                transform var(--bbrsvp-transition), box-shadow var(--bbrsvp-transition);
    padding: 0;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(250, 62, 62, .30);
}

.bbrsvp-dashboard__item-delete:hover {
    background: var(--bbrsvp-red);
    color: #fff;
    transform: scale(1.10);
    box-shadow: 0 2px 8px rgba(250, 62, 62, .45);
}

.bbrsvp-dashboard__item-delete:active {
    transform: scale(0.95);
}

/* Aktions-Bereich bei abgelaufenen Items: immer voll sichtbar */
.bbrsvp-dashboard__item--past .bbrsvp-dashboard__item-actions {
    opacity: 1;
    filter: none;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .bbrsvp-counts {
        gap: 10px;
    }

    .bbrsvp-dashboard__item {
        flex-wrap: wrap;
    }

    .bbrsvp-login-notice__text {
        font-size: 14px;
    }
}
