/* ---------------------------------------------Plugin custom---------------------------------------------*/

/* ── WRAPPER ── */
.spn-events-wrapper {
    width: 100%;
    font-size: 0.9rem;
}

/* ── LIST HEADER ── */
.spn-events-header {
    display: flex;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: #f0f0f0;
    border-bottom: 2px solid #ddd;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: #555;
}

/* ── EVENT ROW ── */
.spn-event-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}
.spn-event-row:hover { background: #fafafa; }

/* ── COLUMNS ── */
.spn-col-name      { flex: 2; font-weight: 600; }
.spn-col-date      { flex: 2; color: #555; }
.spn-col-location  { flex: 2; color: #555; }
.spn-col-spots     { flex: 1; text-align: center; }
.spn-col-action    { flex: 1; text-align: center; }
.spn-col-attendees { flex: 2; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.spn-col-name a {
    text-decoration: none;
    color: inherit;
}
.spn-col-name a:hover { text-decoration: underline; }

/* ── BUTTONS ── */
.spn-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.spn-btn-join  { background: #EF2B89; color: #fff; }
.spn-btn-join:hover  { background: #9c1b5a; color: #FFFFFF; }
.spn-btn-leave { background: #d63638; color: #fff; }
.spn-btn-leave:hover { background: #b32d2e; }
.spn-btn-login { background: #888; color: #fff; }
.spn-btn-login:hover { background: #666; }

/* ── FEEDBACK ── */
.spn-feedback {
    display: block;
    font-size: 0.78rem;
    margin-top: 4px;
}
.spn-feedback-success { color: #2a9d3a; }
.spn-feedback-error   { color: #d63638; }

/* ── AVATARS ── */
.spn-avatars img {
    border-radius: 50%;
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
    margin-left: -6px;
}
.spn-avatars img:first-child { margin-left: 0; }
.spn-more-attendees {
    font-size: 0.75rem;
    color: #888;
    margin-left: 4px;
}

/* ── DETAIL CARD ── */
.spn-event-card.spn-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.spn-event-title { margin: 0 0 1rem; }
.spn-event-meta  { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.spn-meta-item   { display: flex; align-items: center; gap: 0.5rem; color: #555; }
.spn-event-description { margin: 1.5rem 0; line-height: 1.7; }
.spn-event-actions { margin: 1.5rem 0; }

/* ── ATTENDEES ── */
.spn-attendees-block  { margin-top: 1.5rem; }
.spn-attendees-title  { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; color: #888; margin-bottom: 0.5rem; }
.spn-attendees-list   { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.spn-attendee         { display: flex; align-items: center; gap: 0.5rem; }
.spn-attendee img     { border-radius: 50%; width: 28px; height: 28px; }
.spn-no-attendees     { color: #aaa; font-style: italic; font-size: 0.85rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .spn-events-header { display: none; }
    .spn-event-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .spn-col-name, .spn-col-date, .spn-col-location,
    .spn-col-spots, .spn-col-action, .spn-col-attendees {
        flex: unset;
        width: 100%;
    }
}

.spn-events-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.spn-event-card {
    /* background: #1e1e1e; */
    padding: 20px;
    border-radius: 10px;
    position: relative;
    display: flex;
    border: 1px solid #FFFFFF;
}

.spn-event-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spn-event-meta {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    font-size: 14px;
}

.spn-spots {
    position: relative;
    cursor: pointer;
}

.spn-attendees-tooltip {

    position: absolute;
    top: 30px;
    left: 0;

    background: #240925;
    padding: 10px;
    border-radius: 8px;

    display: none;
    flex-direction: column;
    gap: 6px;

    min-width: 200px;
    z-index: 10;
}

.spn-spots:hover .spn-attendees-tooltip {
    display: flex;
}

.spn-attendee {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spn-events-list {

    width: 100%;
    display: flex;
    flex-direction: column;
}

/* HEADER */

.spn-events-header {

    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.5fr 0.5fr;

    padding: 15px;
    background: #080b14;
    color: #FFFFFF !important;

    font-weight: bold;
    border-radius: 8px 8px 0 0;
}

/* ROW */

.spn-event-row {

    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.5fr 0.5fr;

    padding: 15px;
    border-bottom: 1px solid #333;

    align-items: center;
    color: #ffffff;
}

.spn-event-row:hover {
    background: #240925;
}

/* columns */

.spn-col-name a {
    color: #ffffff;
    font-weight: 600;
}

.spn-col-date,
.spn-col-location,
.spn-col-spots,
.spn-col-action {
    font-size: 14px;
    color: #ffffff;
}

/* spots tooltip */

.spn-spots {

    position: relative;
    cursor: pointer;
}

.spn-attendees-tooltip {

    position: absolute;
    top: 30px;
    left: 0;

    background: #2a2a2a;
    padding: 10px;
    border-radius: 8px;

    display: none;
    flex-direction: column;
    gap: 6px;

    min-width: 180px;
    z-index: 10;
}

.spn-spots:hover .spn-attendees-tooltip {
    display: flex;
}

/* attendee */

.spn-attendee {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* button */

.spn-btn {

    color: white;

    border: none;
    padding: 6px 12px;
    border-radius: 6px;

    cursor: pointer;
}

.spn-btn-leave {
    background: #ef4444;
}

/* ── SERVICE PROVIDER FORM ── */

.spn-sp-form {

    display: flex;
    flex-direction: column;
    gap: 6px;

    min-width: 170px;
    margin-bottom: 8px;
    text-align: left;
}

.spn-sp-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #aaa;
}

.spn-sp-select,
.spn-sp-other {

    width: 100%;
    padding: 6px 8px;

    border: 1px solid #444;
    border-radius: 6px;

    background: #1a1a1a;
    color: #ffffff;
    font-size: 14px;
}

.spn-sp-actions {
    display: flex;
    gap: 6px;
}

.spn-btn-confirm { background: #EF2B89; }
.spn-btn-confirm:hover { background: #9c1b5a; }
.spn-btn-cancel  { background: #555; }
.spn-btn-cancel:hover { background: #444; }

/* ── ATTENDING ORGANISATIONS ── */

.spn-attendees-tooltip {

    min-width: 260px;
    max-width: 320px;
    max-height: 280px;
    overflow-y: auto;

    padding: 6px;
    gap: 2px;

    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.spn-attendee {

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 6px 8px;
    border-radius: 6px;

    transition: background 0.15s ease;
}

.spn-attendee:hover {
    background: rgba(255, 255, 255, 0.07);
}

.spn-org-avatar {

    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;

    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.spn-attendee-sp {

    flex: 1 1 auto;
    min-width: 0;

    color: #f0f0f0;
    font-size: 0.875rem;
    line-height: 1.3;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spn-attendee-count {

    flex: 0 0 auto;

    min-width: 22px;
    padding: 2px 7px;

    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;

    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}

.spn-attendee-count::before {
    content: "×";
    opacity: 0.7;
}

/* ── ORGANISATIONS PANEL (single event page) ── */

.spn-booking-attendees .spn-attendees-tooltip {

    position: static;
    display: flex;

    min-width: 0;
    max-width: none;
    max-height: none;
    overflow: visible;

    padding: 0;

    background: none;
    border: 0;
    box-shadow: none;
}
