/**
 * CubeWP Listings Events Styles
 *
 * @package cubewp-listings/cube/assets/frontend/css
 * @version 1.0.0
 */

/* ============================================
   Event Attendance Widget Styles
   ============================================ */

   .cwp-event-attendance-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.cwp-event-attendance-info-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.cwp-event-attendance-question {
    font-weight: 500;
    color: #333;
}

.cwp-event-attendance-count-wrapper {
    display: inline-block;
}

.cwp-event-attendance-count {
    font-weight: 600;
    color: #666;
}

.cwp-event-attendance-button-wrapper {
    display: block;
}

.cwp-event-attendance-button {
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
    text-decoration: none;
    outline: none;
}

.cwp-event-attendance-button:focus {
    outline: none;
}

.cwp-event-attendance-button.going {
    background: #28a745;
    color: #fff;
}

.cwp-event-attendance-button.going:hover {
    background: #218838;
}

.cwp-event-attendance-button.not-going {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

.cwp-event-attendance-button.not-going:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Separator before button (Going / Book Now) */
.cwp-event-attendance-separator {
    position: relative;
    border-top: 2px dashed #efecf3;
    width: 100%;
    flex-shrink: 0;
}

.cwp-event-attendance-separator::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 28px;
    top: -14px;
    left: -3px;
    z-index: 99;
    pointer-events: none;
    background: #f5f4f8;
    box-shadow: 0 10px 44px #c7c0dd33;
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
}

.cwp-event-attendance-separator::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 28px;
    top: -14px;
    right: -3px;
    z-index: 99;
    pointer-events: none;
    background: #f5f4f8;
    box-shadow: 0 10px 44px #c7c0dd33;
    border-top-left-radius: 50px;
    border-bottom-left-radius: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .cwp-event-attendance-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cwp-event-attendance-info-wrapper {
        width: 100%;
    }

    .cwp-event-attendance-button-wrapper {
        width: 100%;
    }

    .cwp-event-attendance-button {
        width: 100%;
    }
}

/* ============================================
   Event Tickets Widget Styles
   ============================================ */

.cwp-event-tickets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.cwp-event-ticket-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.cwp-event-ticket-button:focus {
    outline: none;
}

.cwp-ticket-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cwp-ticket-icon img {
    max-width: 20px;
    max-height: 20px;
    object-fit: contain;
}

.cwp-ticket-icon svg {
    width: 1em;
    height: 1em;
}

.cwp-ticket-text {
    display: inline-block;
}

.cwp-ticket-platform {
    display: inline-block;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .cwp-event-tickets-container {
        flex-direction: column;
    }

    .cwp-event-ticket-button {
        width: 100%;
    }
}

/* ============================================
   Event Attendees Widget Styles
   ============================================ */

.cwp-event-attendees-widget {
    width: 100%;
}

.cwp-event-attendees-title {
    margin: 0 0 20px 0;
    font-weight: 600;
}

.cwp-event-attendees-list {
    width: 100%;
}

.cwp-event-attendees-list.cwp-attendees-grid {
    display: grid;
    gap: 20px;
}

.cwp-event-attendees-list.cwp-attendees-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.cwp-event-attendee-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cwp-event-attendee-avatar {
    display: inline-block;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.cwp-event-attendee-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cwp-event-attendee-name {
    margin-top: 10px;
    font-weight: 500;
    word-break: break-word;
}

.cwp-event-attendee-subtitle {
    margin-top: 4px;
    font-size: 0.85em;
    color: #666;
}

/* Event Attendees - List Style (overlapping avatars + N+) */
.cwp-event-attendees-list-style {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.cwp-event-attendees-list-style span {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.cwp-event-attendees-list-style span img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cwp-event-attendees-list-style span.cwp-attendee-plus {
    font-size: 0.45em;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stack order: first avatar lowest, last (+N) highest - supports up to 11 items */
.cwp-event-attendees-list-style span:nth-last-child(11) {
    z-index: 1;
}

.cwp-event-attendees-list-style span:nth-last-child(10) {
    z-index: 2;
}

.cwp-event-attendees-list-style span:nth-last-child(9) {
    z-index: 3;
}

.cwp-event-attendees-list-style span:nth-last-child(8) {
    z-index: 4;
}

.cwp-event-attendees-list-style span:nth-last-child(7) {
    z-index: 5;
}

.cwp-event-attendees-list-style span:nth-last-child(6) {
    z-index: 6;
}

.cwp-event-attendees-list-style span:nth-last-child(5) {
    z-index: 7;
}

.cwp-event-attendees-list-style span:nth-last-child(4) {
    z-index: 8;
}

.cwp-event-attendees-list-style span:nth-last-child(3) {
    z-index: 9;
}

.cwp-event-attendees-list-style span:nth-last-child(2) {
    z-index: 10;
}

.cwp-event-attendees-list-style span:nth-last-child(1) {
    z-index: 11;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .cwp-event-attendees-list.cwp-attendees-grid.cwp-columns-tablet-auto {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    }

    .cwp-event-attendees-list.cwp-attendees-grid.cwp-columns-tablet-1 {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .cwp-event-attendees-list.cwp-attendees-grid.cwp-columns-tablet-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .cwp-event-attendees-list.cwp-attendees-grid.cwp-columns-tablet-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .cwp-event-attendees-list.cwp-attendees-grid.cwp-columns-tablet-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .cwp-event-attendees-list.cwp-attendees-grid.cwp-columns-mobile-auto {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
    }

    .cwp-event-attendees-list.cwp-attendees-grid.cwp-columns-mobile-1 {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .cwp-event-attendees-list.cwp-attendees-grid.cwp-columns-mobile-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .cwp-event-attendees-list.cwp-attendees-grid.cwp-columns-mobile-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .cwp-event-attendees-list.cwp-attendees-flex {
        gap: 15px;
    }

    .cwp-event-attendee-item {
        width: 100%;
        max-width: 150px;
    }
}

/* ============================================
   Event Attendance - Event Ended Block
   ============================================ */

.cwp-event-attendance-ended-block {
    width: 100%;
    text-align: center;
}

.cwp-event-attendance-ended-block .cwp-event-attendance-ended-image {
    margin-bottom: 1em;
}

.cwp-event-attendance-ended-block .cwp-event-attendance-ended-image img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.cwp-event-attendance-ended-title {
    margin: 0 0 0.5em 0;
    font-size: 1.25em;
}

.cwp-event-attendance-ended-desc {
    margin: 0 0 1em 0;
}

.cwp-event-attendance-ended-btn {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.cwp-event-attendance-ended-btn:hover {
    opacity: 0.9;
}

/* ============================================
   Event Attendance - Paid Event Sidebar
   ============================================ */

.cwp-event-attendance-sidebar {
    width: 100%;
}

.cwp-event-sidebar-time-left-inner {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cwp-event-sidebar-time-left-inner .cwp-event-sidebar-section-title {
    display: inline-block;
    margin: 0;
    color: #4D6B81;
    font-size: 12px;
    line-height: 15px;
    font-weight: 400;
}

.cwp-event-sidebar-time-left-inner .cwp-event-online-trans {
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #4D6B81;
    padding: 5px 10px;
    box-shadow: 0 10px 44px #c7c0dd66;
    border: 1px solid #DAE3E9;
    border-radius: 10px;
    font-size: 12px;
}

.cwp-event-sidebar-time-left-inner i {
    color: #74E652;
}

.cwp-event-time-left-text {
    padding: 15px 15px;
    color: #4D6B81;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border: 1px solid #7696AE45;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 35px;
}

.cwp-event-time-left-text .cwp-event-clock-img {
    width: 20px;
    height: 20px;
    user-select: none;
    pointer-events: none;
}

.cwp-event-sidebar-time-place {
    width: 100%;
}

.cwp-event-attendance-sidebar .wc-woo-products-countdown.style1 {
    width: 100%;
    padding: 15px;
    height: auto;
	flex-wrap: wrap;
    color: #4D6B81;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0;
    flex-wrap: wrap;
    border: 1px solid #7696AE45;
    border-radius: 15px;
    margin-bottom: 35px;
}

.cwp-event-attendance-sidebar .wc-timezone-data {
    padding-right: 32px;
    position: relative;
}
.cwp-event-attendance-sidebar .wc-timezone-data:before {
    content: "";
    position: absolute;
    height: 40px;
    width: 1px;
    background: #7696AE45;
    top: 2px;
    right: 17px;
}
.cwp-event-attendance-sidebar .wc-timezone-data:last-child {
    border-right: 0;
    margin: 0;
    padding: 0;
}
.cwp-event-attendance-sidebar .wc-timezone-data:last-child:before {
    content: unset;
    display: none;
}
.cwp-event-attendance-sidebar .wc-woo-products-countdown.style1 .wc-timezone-data .wrapper .time {
    margin-top: 0px;
    margin-bottom: 1px;
    padding-top: 6px;
    line-height: unset;
    font-size: unset;
    display: flex;
    gap: 7px;
}

.cwp-event-attendance-sidebar .wc-woo-products-countdown.style1 .wc-timezone-data .wrapper .time .digit {
    color: #2C3E50;
    font-size: 20px;
    line-height: 20px;
    font-weight: 700;
    display: inline-block;
}

.cwp-event-attendance-sidebar .wc-woo-products-countdown.style1 .wc-timezone-data .wrapper .label {
    font-size: 10px;
    text-transform: capitalize;
    color: #4D6B81;
    font-weight: 700;
    line-height: 20px;
}

.cwp-event-sidebar-section-title {
    color: #4D6B81;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    margin-bottom: 30px;
}

.cwp-event-sidebar-row {
    margin-bottom: 40px;
    width: 100%;
    padding-left: 8px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
}

.cwp-event-sidebar-row i {
    color: #4D6B81;
    font-size: 13px;
    width: 25px;
}

.cwp-event-sidebar-row.cwp-event-start-time i {
    color: #00B724;
}

.cwp-event-sidebar-row.cwp-event-end-time i {
    color: #C70000;
}

.cwp-event-sidebar-row .cwp-event-sidebar-label {
    display: block;
    font-size: 12px;
    color: #4D6B81;
    font-weight: 500;
    line-height: 20px;
}

.cwp-event-sidebar-row .cwp-event-sidebar-value {
    display: block;
    color: #4D6B81;
    font-size: 13px;
    font-weight: 500;
}

.cwp-event-sidebar-row.cwp-event-online-url a,
.cwp-event-sidebar-row.cwp-event-location a {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color:  #0B5ED7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cwp-event-sidebar-row.cwp-event-online-url a:hover,
.cwp-event-sidebar-row.cwp-event-location a:hover {
    color: #000;
    text-decoration: underline;
}

.cwp-event-attendance-sidebar .cwp-from-cwp_booking .cwp-field-container.cwp-field-number {
    display: flex;
    background: white;
    padding: 0 !important;
    justify-content: space-between;
    margin-bottom: 40px !important;
    align-items: center;
    border-radius: 0 !important;
}

.cwp-from-cwp_booking .cwp-field-detail label {
    color: #4D6B81;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    margin-bottom: 30px;
}


.cwp-from-cwp_booking .booking-number-counter {
    width: auto !important;
}

.cwp-event-attendance-sidebar .cwp-from-cwp_booking .cwp-counter-button.counter-down,
.cwp-event-attendance-sidebar .cwp-from-cwp_booking .cwp-counter-button.counter-up {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: #000000;
    background: #f2f6fa;
    border: 1px solid #d0dbe5 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cwp-from-cwp_booking .cwp-counter-button:hover {
    background: #4D6B81 !important;
    color: #fff !important;
    border-color: #4D6B81 !important;
}

.cwp-event-attendance-sidebar .cwp-from-cwp_booking .cwp-booking-number .cwp-counter-button.counter-down.disabled,
.cwp-event-attendance-sidebar .cwp-from-cwp_booking .cwp-booking-number .cwp-counter-button.counter-down.disabled:hover {
    background: #f2f6fa !important;
    color: #000000 !important;
    border: 1px solid #d0dbe5 !important;
    cursor: pointer !important;
    opacity: 0.3;
}

.cwp-from-cwp_booking .booking-number-counter input[type="number"] {
    width: 40px;
    height: 26px;
    text-align: center;
    border-radius: 5px;
    border: 1px solid #d0dbe5;
    font-size: 14px !important;
    font-weight: 500;
    background: #ffffff !important;
    outline: none;
}

/*.cwp-from-cwp_booking .cwp-booking-submit-wrapper {
    display: inline-block;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px dashed #EFECF3;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    min-width: calc(100% + 40px);
    position: relative;
}

.cwp-from-cwp_booking .cwp-booking-submit-wrapper:before {
    content: '';
    position: absolute;
    width: 15px;
    height: 28px;
    top: -14px;
    left: 0;
    z-index: 99;
    background: #f5f4f8;
    box-shadow: 0 10px 44px #c7c0dd33;
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
}

.cwp-from-cwp_booking .cwp-booking-submit-wrapper:after {
    content: '';
    position: absolute;
    width: 15px;
    height: 28px;
    top: -14px;
    right: 0;
    z-index: 99;
    background: #f5f4f8;
    box-shadow: 0 10px 44px #c7c0dd33;
    border-top-left-radius: 50px;
    border-bottom-left-radius: 50px;
} */

.cwp-from-cwp_booking .cwp-booking-submitBTN.cwp-from-submit {
    border-radius: 15px;
    background: #F3CE63;
    padding: 20px 0;
    text-align: center;
    border: none;
    width: 100%;
    display: inline-block;
    font-size: 16px;
    color: #2C3E50;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: capitalize;
    filter: brightness(1.1);
    position: relative;
    transition: all 0.5s ease !important;
}

.cwp-from-cwp_booking .cwp-booking-submitBTN.cwp-from-submit:hover {
    color: #fff;
    font-weight: 700;
    filter: brightness(1);
}

.cubewp-elementor-form-messages {
    margin: 0 !important;
}

.cwp-event-attendance-sidebar .cwp-event-attendance-external {
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid #eee;
}


/* ============================================
   Group Join Button Widget Styles
   ============================================ */

.cwp-group-join-container {
    width: 100%;
}

.cwp-group-join-btn {
    display: inline-block;
    cursor: pointer;
    border: none;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    outline: none;
    transition: all 0.3s ease;
}

.cwp-group-join-btn:focus {
    outline: none;
}

.cwp-group-join-btn.disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* ============================================
   Group Members Widget Styles
   ============================================ */

.cwp-group-members-widget {
    width: 100%;
}

.cwp-group-members-count {
    display: inline-block;
}

/* Count + Text (flex column layout) */
.cwp-group-members-count-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.cwp-group-members-count-text .cwp-group-members-count-text-count,
.cwp-group-members-count-text .cwp-group-members-count-text-label {
    display: block;
}

.cwp-group-members-avatar-count {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cwp-group-members-avatar-count .cwp-group-members-avatar {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
}

.cwp-group-members-avatar-count .cwp-group-members-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cwp-group-members-avatar-count p {
    margin: 0;
}

/* Group Members List Style (overlapping avatars + N+) */
.cwp-group-members-list-style {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.cwp-group-members-list-style span {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.cwp-group-members-list-style span img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cwp-group-members-list-style span.cwp-member-plus {
    font-size: 0.45em;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cwp-group-members-list-style span:nth-last-child(11) { z-index: 1; }
.cwp-group-members-list-style span:nth-last-child(10) { z-index: 2; }
.cwp-group-members-list-style span:nth-last-child(9) { z-index: 3; }
.cwp-group-members-list-style span:nth-last-child(8) { z-index: 4; }
.cwp-group-members-list-style span:nth-last-child(7) { z-index: 5; }
.cwp-group-members-list-style span:nth-last-child(6) { z-index: 6; }
.cwp-group-members-list-style span:nth-last-child(5) { z-index: 7; }
.cwp-group-members-list-style span:nth-last-child(4) { z-index: 8; }
.cwp-group-members-list-style span:nth-last-child(3) { z-index: 9; }
.cwp-group-members-list-style span:nth-last-child(2) { z-index: 10; }
.cwp-group-members-list-style span:nth-last-child(1) { z-index: 11; }

/* Group Members Grid */
.cwp-group-members-grid {
    width: 100%;
}

.cwp-group-member-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cwp-group-member-avatar {
    display: inline-block;
    overflow: hidden;
    position: relative;
}

.cwp-group-member-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cwp-group-member-name {
    margin-top: 8px;
    font-weight: 500;
}

.cwp-group-member-subtitle {
    margin-top: 4px;
    font-size: 0.85em;
    color: #666;
}

.cwp-event-booking-placeholder {
    margin: 1em 0 0 0;
    padding: 0.75em;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 0.95em;
    color: #666;
}