/* ===== Event page (scoped) ===== */
.event-page {
    --pace-red: #C02E00;
    --ink: #0A0A0A;
    --muted: #6B6B6B;
}

/* Banner */
.event-page .hero-banner img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

/* Title row */
.event-page .page-title-wrap {
    background: #fff;
}

.event-page .page-title {
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 24px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.event-page h1 {
    font-weight: 800;
    margin: 0 0 4px;
}

.event-page .sport-tag {
    color: #666;
    font-weight: 600;
    font-size: .95rem;
}

/* CTA (only Attend) */
.event-page .btn-attend {
    background: var(--pace-red);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(192, 46, 0, .25);
}

.event-page .btn-notgoing {
    color: var(--pace-red);
    border: 2px solid var(--pace-red);
    background-color: transparent;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(192, 46, 0, .25);
}

.event-page .btn-notgoing:hover {
    background: var(--pace-red);
    color: #fff;
}

.event-page .btn-eventfull {
    background: #666;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(192, 46, 0, .25);
}

/* Details area is plain text (no white card) */
.event-page .event-details {
    max-width: 1040px;
    margin: 16px auto 80px;
    padding: 0 24px;
    background: transparent;
    border: none;
}

.event-page .event-details h2 {
    font-size: 2rem;
    margin: 16px 0;
    letter-spacing: .02em;
}

/* Rows / icons */
.event-page .detail-row {
    display: grid;
    grid-template-columns: 28px auto;
    gap: 12px;
    margin-bottom: 20px;
    align-items: start;
}

.event-page .icon {
    width: 26px;
    height: 26px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    position: relative;
}

.event-page .icon-clock::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 2px;
    background: var(--ink);
    transform: translate(-50%, -50%);
}

.event-page .icon-pin::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    border: 2px solid var(--ink);
    border-radius: 100% 100% 100% 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.event-page .small {
    color: #7a7a7a;
    font-size: .88rem;
}

/* Inline calendar dropdown */
.event-page .cal-dd {
    position: relative;
    display: inline-block;
    margin-top: 4px;
}

.event-page .cal-link {
    color: #0A0A0A;
    text-decoration: underline;
    font-size: .9rem;
}

.event-page .cal-dd .dropdown-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    background: #151515;
    color: #fff;
    border: 1px solid #292929;
    border-radius: 10px;
    min-width: 220px;
    padding: 6px;
    z-index: 30;
    display: none;
}

.event-page .cal-dd.open .dropdown-menu {
    display: block;
}

.event-page .cal-dd .dropdown-menu a {
    display: block;
    padding: 10px 12px;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
}

.event-page .cal-dd .dropdown-menu a:hover {
    background: #1f1f1f;
}

/* Address link + copy */
.event-page .addr-link {
    color: #0A0A0A;
    text-decoration: underline;
}

.event-page .addr-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-right: 36px;
}

.event-page .copy-btn {
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s;
}

.event-page .addr-wrap:hover .copy-btn {
    opacity: 1;
}

.event-page .copy-btn svg {
    width: 14px;
    height: 14px;
}

.event-page .copy-toast {
    position: absolute;
    top: -26px;
    right: -6px;
    background: #111;
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: .8rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .15s, transform .15s;
}

.event-page .copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Typographic blocks */
.event-page .about p {
    margin: 0 0 6px;
}

.event-page ul {
    margin: 10px 0 16px 18px;
}

.event-page li {
    margin-bottom: 6px;
}

/* Host */
.event-page .host {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.event-page .host .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eee;
    display: grid;
    place-items: center;
    font-weight: 700;
    border: 2px solid #111;
}

/* Responsive */
@media (max-width:768px) {
    .event-page .page-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* --- Attending ribbon over hero image --- */
/* Ribbon sits above image, not overlaying */
.event-page .hero-banner .ribbon {
    background: #C02E00;
    /* PACE red */
    color: #0A0A0A;
    height: 44px;
    display: grid;
    place-items: center;
    width: 100%;
    /* optional: subtle separator to the image */
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08) inset;
}

.event-page .hero-banner .ribbon span {
    letter-spacing: .02em;
    font-weight: 600;
}

/* Image directly follows the ribbon */
.event-page .hero-banner img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
}

/* Ensure the image sits under the ribbon */
.event-page .hero-banner img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
}

@media (max-width:768px) {
    .event-page .page-title .cta-wrap {
        align-items: flex-start;
    }
}

/* Forum / Chat section */
.forum-chat {
    max-width: 800px;
    margin: 3rem auto;
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.forum-chat h2 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: #0A0A0A;
}

/* Comment box */
.forum-chat .comment-box {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.forum-chat .comment-box textarea {
    min-height: 80px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: .75rem;
    font-size: .95rem;
    resize: vertical;
}

.forum-chat .comment-box .btn-submit {
    align-self: flex-end;
    background: #C02E00;
    color: #fff;
    border: none;
    padding: .5rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.forum-chat .comment-box .btn-submit:hover {
    background: #a52800;
}

/* Comments */
.forum-chat .comment {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.forum-chat .comment .avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #C02E00;
    color: #fff;
    font-weight: 700;
    display: grid;
    place-items: center;
    font-size: 1rem;
}

.forum-chat .comment .content {
    flex: 1;
}

.forum-chat .comment .meta {
    font-size: .85rem;
    color: #6B6B6B;
    margin-bottom: .25rem;
}

.forum-chat .comment p {
    margin: 0;
    font-size: .95rem;
    line-height: 1.4;
}

.event-page .hero-banner .ribbon {
    display: none;
}

.event-page .hero-banner .ribbon.show {
    display: grid;
}

/* Forum / Chat section */
.forum-chat {
    max-width: 800px;
    margin: 3rem auto;
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.forum-chat h2 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: #0A0A0A;
}

/* Comment box form */
.forum-chat .comment-box form {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

/* Override CakePHP default control styles */
.forum-chat .comment-box textarea,
.forum-chat .comment-box .comment-input {
    width: 100%;
    min-height: 60px;
    /* smaller height */
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: .75rem;
    font-size: .95rem;
    resize: vertical;
    box-sizing: border-box;
}

/* Hide default label if CakePHP renders it */
.forum-chat .comment-box label {
    display: none;
}

/* Post button aligned right with padding */
.forum-chat .comment-box .btn-submit {
    align-self: flex-end;
    /* push to right */
    background: #C02E00;
    color: #fff;
    border: none;
    padding: .6rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.forum-chat .comment-box .btn-submit:hover {
    background: #a52800;
}

.forum-chat .empty-discussion {
    text-align: center;
    color: var(--muted);
    font-size: .95rem;
    margin: 1.5rem 0;
}

.host .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f2f5;
    border: 1px solid #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #374151;
    overflow: hidden;
}

.host .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Action bar --- */
.action-bar {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-top: .25rem;
    padding: .25rem 0
}

.action-bar-sm {
    gap: .5rem
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .95rem;
    color: #9aa3ab;
    background: transparent;
    border: 0;
    padding: .25rem .35rem;
    border-radius: .5rem;
    cursor: pointer
}

.btn-action:hover {
    color: #111;
    background: rgba(0, 0, 0, .04);
    text-decoration: none
}

.btn-action .count {
    font-variant-numeric: tabular-nums;
    min-width: 1ch
}

.btn-like[aria-pressed="true"] {
    color: #B52B00
}

.inline-delete-form {
    display: inline
}

/* Replies accordion */
.forum-chat .btn-view-replies {
    color: #B52B00 !important;
    font-weight: 600;
    text-decoration: none
}

.forum-chat .btn-view-replies:hover {
    text-decoration: underline
}

.forum-chat .btn-view-replies .chev {
    margin-left: .25rem;
    transition: transform .2s ease;
    vertical-align: middle
}

.forum-chat .btn-view-replies[aria-expanded="true"] .chev {
    transform: rotate(180deg)
}

.forum-chat .replies-collapse {
    margin-left: 2.75rem;
    border-left: 2px solid #eee;
    padding-left: 1rem;
    margin-top: .5rem
}

/* Reply toggle */
.forum-chat .btn-reply-toggle {
    color: #6c757d;
    font-weight: 600;
    text-decoration: none
}

.forum-chat .btn-reply-toggle:hover {
    text-decoration: underline
}

.replybox-collapse {
    margin-top: .5rem
}

/* Ensure avatar images fit the circular avatar holder */
.avatar-img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: cover;
}

/* Inline attendees line */
.attendees-line {
    display: flex;
    align-items: center;
    gap: .25rem;
    cursor: pointer;
}

.attendees-line .avatars {
    display: flex;
}

.attendees-line .avatar {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    background: #e5e7eb;
    color: #555;
    font-weight: 600;
    font-size: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -8px;
}

.attendees-line .avatar:first-child {
    margin-left: 0;
}

.attendees-line .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attendees-line .avatar.more {
    background: #f3f4f6;
}

.attendee-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eee;
}

.attendee-row:hover {
    background: #fafafa;
}

.attendee-row .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #555;
}

.attendee-row .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attendee-row .name {
    font-size: .95rem;
}

.attendees-text {
    font-size: .9rem;
    color: #666;
}