/* ========== GRUNDSTYLES ========== */

:root {
    --bb-primary-color: #0E5A8A;
    --bb-success-color: #026018; /* Join-Button */
    --bb-alert-color: #6f000b;   /* Leave-Button */
}

.bb-event-actions {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

.bb-event-actions button, .bb-group-link-button, .bb-event-link-button {
    display: inline-block;
    padding: 10px 10px;
    background: #0E5A8A;
    color: white !important;
    text-decoration: none;;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8em;
    font-family: "Roboto", Sans-serif;
    transition: all 0.3s ease;
    border-radius: 50px 50px 50px 50px;
    /*padding: 10px 10px 10px 10px;*/
    line-height: 1;
}

.bb-group-link-button:hover, .bb-event-link-button:hover{
    background-color: #900;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.bb-event-actions button.join-event {
    background-color: var(--bb-success-color, #026018);
}

.bb-event-actions button.leave-event {
    background-color: var(--bb-alert-color, #6f000b); /* Rot für Leave */
    line-height: 1;
}

.bb-event-actions button.join-event:hover, .bb-event-actions button.leave-event:hover {
    filter: brightness(120%);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ========== Group to event link ========== */

.bb-event-link-container {
    text-align: center;
    position: absolute;
    left: 20px;
    bottom: 15px;
}

.bb-event-link-button {
    text-align: center;
    font-size: 1em;
}

.elementor-button-icon svg {
    height: 1em;
    fill: #fff; /* Weiß */
}

@media screen and (max-width: 767px) {
    #buddypress .groups-header #cover-image-container.left #item-header-content .group-actions-wrap {
        padding-bottom: 35px !important;
    }
}

/* ========== MITGLIEDERLISTE ========== */
.bb-event-members {
    margin: 20px 0;
}

.bb-event-members ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

@media (prefers-color-scheme: dark) {
    .bb-event-members li {
        background: rgba(255, 255, 255, 0.1);
    }
}

.bb-event-members li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(221, 221, 221, 0.15);
    border-radius: 4px;
}

.bb-member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bb-member-name {
    font-size: 14px;
    color: inherit;
}

.bb-member-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

@media (max-width: 767px) {
    .bb-participants-icon {
        display: none !important;
    }
    .bb-event-members {
    margin: 10px 0;
    }
}



/* ========== LOADING-STATES ========== */
.event-loading {
    margin-left: 10px;
    color: #666;
    font-style: italic;
}

.bb-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: bb-spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes bb-spin {
    to { transform: rotate(360deg); }
}

/* ========== List of participiants ========== */

.bb-participant-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
    align-items: flex-start;
    margin-top: 5px;
}

.bb-participant {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    padding: 4px 4px;
    background: #f8f9fb;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}
.bb-participant:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.elementor .bb-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
    border: 2px solid #e0e0e0;
    background: #fff;
    box-shadow: 0 0 0 2px #fff inset;
}

.bb-name {
    text-align: center;
    font-size: 0.8em;
    margin-top: 2px;
    color: #222;
    font-weight: 500;
    word-break: break-word;
}

/* ========== Inline Message ========== */

.bb-event-status {
  margin: 10px 0;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 1rem;
  display: none;
}
.bb-event-status.success {
  background: #e7fbe7;
  color: #148214;
  border: 1px solid #c1eac1;
}
.bb-event-status.error {
  background: #fbe7e7;
  color: #a21414;
  border: 1px solid #eac1c1;
}

/* ========== Disable pinned postings on event page ========== */
.event-activity-class li.bb-pinned,
.event-activity-class li.sticky,
.event-activity-class li.bp-activity-sticky {
    display: none !important;
}