/**
 * Custom Events - Payoutai Theme Style
 * List + Calendar views, Key Deadlines, Upcoming sidebar
 */

.events-custom-sec {
    padding: 40px 0 ;
    font-family: "Barlow", sans-serif;
    color: #1e202a;
}
.events-custom-sec .page-ttl{
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px dotted #a9a9a9;
}

.events-controls-bar {
    margin-bottom: 30px;
}

.events-view-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
}

.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 12px 24px;
    border: 1px solid #DDD;
    background: #fff;
    color: #1e202a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle-btn.active {
    background: #4a6fd4;
    color: #fff;
    border-color: #4a6fd4;
}

.events-filters-row {
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.events-search-box {
    position: relative;
    flex: 1;
    min-width: 220px;
}
.events-search-box input{
    padding-left: 40px !important;
}

.events-search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.events-filter-select {
    min-width: 160px;
}


.events-count-row {
    margin-bottom: 20px;
}

.events-count {
    font-size: 14px;
}

.events-feature-block {
    gap: 30px;
    align-items: flex-start;
}

.events-main-content {
    flex: 1;
    min-width: 0;
}

.events-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 10px;
}

.events-active-filters {
    background: #f1f4fc;
    padding: 15px;
    /* border-radius: 8px; */
    margin-bottom: 20px;
    border: none;
}

.filter-tag {
    color: #FFFFFF;
    background: #4A6FD4;
    position: relative;
    padding: 7px 12px 5px;
    /* padding-right: 24px; */
    font-size: 10px;
    font-weight: 500;
    letter-spacing: -0.04px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.2;
    text-transform: uppercase;
    margin-right: 4px;
    margin-bottom: 4px;
}
/* .filter-tag::after {
    content: '×';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 4px;
    background: #FFFFFF;
    color: #4A6FD4;
    border-radius: 100%;
    width: 16px;
    height: 16px;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
} */

.events-view-panel {
    display: none;
}

.events-view-panel.active {
    display: block;
}

/* List View */
.events-list-holder {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.event-list-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}
.event-list-card:last-child{
    margin-bottom: 0;
}

.event-list-card-inner {
    align-items: stretch;
    min-height: 140px;
    padding: 20px;
    gap: 20px;
}

.event-date-badge {
    flex-shrink: 0;
}

.event-date-text {
    background: #4a6fd4;
    color: #fff;
    padding: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.3;
    border-radius: 5px;
    height: 80px;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-list-content {
    flex: 1;
}

.event-list-title {
    margin: 0 0 8px;
}

.event-list-organizer,
.event-list-venue {
    font-size: 14px;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-list-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 12px 0;
}

.event-tag-pill {
    border: 1px solid #4A6FD4;
    color: #4A6FD4;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: -0.04px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.2;
    text-transform: uppercase;
}

.event-list-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    /* padding-top: 15px;
    border-top: 1px dotted #a9a9a9; */
}

.btn-event,
.btn-upgrade {
    background-color: #1E202A;
    color: #fff ;
    cursor: pointer;
    border: 1px solid #1E202A;
    width: fit-content;
    padding: 6px 30px;
    font-family: "Barlow", sans-serif;
    border-radius: 999px;
    font-size: 14px;
    letter-spacing: -0.2px;
    transition: all .3s ease-in-out;
    text-align: center;
}

.btn-calendar {
    background: #1E202A;
    color: #FFF;
}

.btn-event:hover,
.btn-upgrade:hover {
    background: transparent;
    color: #1E202A;
}

.btn-details {
    background: transparent;
    color: #1e202a;
}

.btn-details:hover {
    background: #1e202a;
    color: #fff;
}

.event-type-label {
    min-width: fit-content;
    flex-shrink: 0;
    padding: 0 16px;
    font-size: 12px;
    color: #4A6FD4;
    text-align: center;
    align-self: self-start;
    border-radius: 999px;
    border: 1px solid #4A6FD4;
}

/* Calendar View */
.events-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.calendar-nav-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #DDD;
    background: #fff;
    border-radius: 999px;
    font-size: 0;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    position: relative;
}

.calendar-nav-btn:hover {
    background-color: #4a6fd4;
    color: #fff;
    border-color: #4a6fd4;
}
.calendar-nav-btn::before{
    position: absolute;
    content: '';
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 100%;
    width: 100%;
    background: url(../images/right-arrow.svg) no-repeat center;
    background-size: 18px 18px;
    transition: all .3s ease-in-out;
}
.calendar-nav-btn:hover::before{
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(294deg) brightness(200%) contrast(200%);
}
#calendar-prev::before {
    transform: translate(-50%, -50%) rotate(180deg);
}

.calendar-month-year {
    font-size: 20px;
    font-weight: 600;
    color: #1e202a;
    margin: 0;
}

.events-calendar-grid {
    background: #fff;
    border: 1px solid #DDD;
    border-radius: 12px;
    overflow: hidden;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f1f4fc;
    font-size: 12px;
    font-weight: 600;
    color: #1E202A;
    text-transform: uppercase;
}

.calendar-weekdays span {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #DDD;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-cell {
    min-height: 100px;
    padding: 10px;
    border-right: 1px solid #DDD;
    border-bottom: 1px solid #DDD;
    font-size: 14px;
    color: #1e202a;
}

.calendar-cell:nth-child(7n) {
    border-right: none;
}

.calendar-cell.other-month {
    color: #cbd5e1;
    background: rgb(241, 244, 252, .5);
}

.calendar-cell.has-events {
    background: #f4f5f9;
}

.cell-day {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.cell-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-event {
    font-size: 11px;
    padding: 0px 8px;
    background: #4a6fd4;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event.event-type-awards,
.legend-dot.event-type-awards { background: #0d9488; }
 
.calendar-event.event-type-conference,
.legend-dot.event-type-conference { background: #4a6fd4; }
 
.calendar-event.event-type-earnings,
.legend-dot.event-type-earnings { background: #ea580c ; }
 
.calendar-event.event-type-lp-meeting,
.legend-dot.event-type-lp-meeting { background: #16a34a; }
 
.calendar-event.event-type-rate-decision,
.legend-dot.event-type-rate-decision { background: #7c3aed; }
 
.calendar-event.event-type-webinar,
.legend-dot.event-type-webinar { background: #ec4899; }
 
/* Fallback colors for other types (nth-child based) */
.calendar-event.event-type-event { background: #64748b; }
.legend-dot.event-type-event { background: #64748b; }

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    font-size: 13px;
    color: #64748b;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Sidebar */
.events-sidebar-block {
    margin-bottom: 24px;
}

.events-sidebar-block h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e202a;
    margin: 0 0 16px;
    padding-bottom: 16px;
    border-bottom: 1px dotted #a9a9a9;
}

.deadlines-list .deadline-item,
.upcoming-list .upcoming-item,
.upgrade-payout {
    display: flex;
    /* align-items: center; */
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: color 0.2s ease;
    border: 1px solid #ddd;
    border-radius: 12px;
}
/* .deadlines-list .deadline-item:first-child,
.upcoming-list .upcoming-item:first-child {
    padding-top: 0;
} */
.upgrade-payout{
    flex-direction: column;
    padding: 20px;
}
.upgrade-payout p{
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}
.upgrade-logo{
    align-items: center;
    width: 100%;
    font-weight: 600;
    margin-bottom: 12px;
}
.upgrade-payout .btn-upgrade{
    width: 100%;
}
.upgrade-icon{
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: #4a6fd4;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-right: 8px;
    font-weight: 600;
}

.deadline-title,
.upcoming-title {
    font-size: 14px;
    color: #1e202a;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    line-height: 1.5;
}
.deadline-label,
.deadline-countdown{
    font-size: 12px;
    color: #94a3b8;
}
.deadline-countdown{
    color: #ea580c;
}
.deadline-meta,
.deadline-info{
    display: flex;
    align-items: flex-end;
    flex-direction: column;
}
.deadline-info{
    align-items: flex-start;
}


.deadline-date,
.upcoming-date {
    font-size: 12px;
    margin-left: 12px;
}

.upcoming-item {
    flex-direction: column;
    align-items: flex-start;
}
.upcoming-item .upcoming-title{
    white-space: inherit;
}

.upcoming-date {
    font-size: 12px;
    color: #4a6fd4;
    font-weight: 600;
    margin: 0 0 4px;
}

.no-items {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

.events-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 24px;
    color: #94a3b8;
}

.events-loading.small {
    padding: 30px 20px;
    font-size: 18px;
}

.no-events-found,
.events-error {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.events-pagination {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 0;
}

/* Event Detail Sidebar */
#event-detail-sidebar {
    position: fixed;
    top: 0;
    right: -520px;
    width: 520px;
    max-width: 100%;
    height: 100vh;
    z-index: 9999;
    transition: right 0.3s ease;
}

#event-detail-sidebar.open {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#event-detail-sidebar.open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

.sidebar-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    overflow-y: auto;
    z-index: 1;
}

.sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background: #e2e8f0;
}

.sidebar-inner {
    padding: 24px;
}

.event-detail-wrapper {
    padding-top: 10px;
}

.event-type-badge {
    min-width: fit-content;
    flex-shrink: 0;
    padding: 4px 16px;
    font-size: 12px;
    color: #4A6FD4;
    text-align: center;
    align-self: self-start;
    border-radius: 999px;
    border: 1px solid #4A6FD4;
}

.event-detail-title {
    font-size: 26px;
    font-weight: 700;
    color: #1e202a;
    margin: 24px 0 8px;
    line-height: 1.3;
}

.event-detail-organizer {
    margin: 0 0 24px;
}

.event-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f1f4fc;
    border-left: 3px solid #4A6FD4;
}

.event-meta-icon {
    width: 44px;
    height: 44px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.event-meta-content {
    display: flex;
    flex-direction: column;
}

.event-meta-value {
    font-size: 15px;
    font-weight: 600;
    color: #1e202a;
    margin-bottom: 2px;
}

.event-meta-label {
    font-size: 13px;
    color: #94a3b8;
}

.event-detail-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e202a;
    margin: 0 0 14px;
}

.focus-area-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.focus-tag {
    border: 1px solid #4A6FD4;
    color: #4A6FD4;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.04px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.2;
    text-transform: uppercase;
}

.event-description {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
}

.event-description p {
    margin: 0 0 12px;
}

.why-matters-box {
    background: #f1f4fc;
    padding: 20px;
    margin-bottom: 24px;
}

.why-matters-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4A6FD4;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 12px;
}

.why-matters-content {
    font-size: 14px;
    line-height: 1.7;
    color: #475569;
    margin: 0;
}

.event-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.btn-action {
    cursor: pointer;
    border: 1px solid #1E202A;
    width: fit-content;
    padding: 10px 30px;
    font-family: "Barlow", sans-serif;
    border-radius: 999px;
    font-size: 14px;
    letter-spacing: -0.2px;
    width: 100%;
    transition: all .3s ease-in-out;
    text-align: center;
}

.btn-primary-action {
    background: #1E202A;
    color: #fff;
}

.btn-primary-action:hover {
    background: transparent;
    color: #1E202A;
    transform: translateY(-1px);
}

.btn-secondary-action {
    background: #fff;
    color: #1E202A;
    border: 1px solid #1E202A;
}

.btn-secondary-action:hover {
    background: #1E202A;
    color: #fff;
}


body.sidebar-open {
    overflow: hidden;
}

@media (max-width: 991px) {
    .events-feature-block {
        flex-direction: column;
    }

    .events-sidebar {
        width: 100%;
        order: -1;
    }

    .event-list-card-inner {
        flex-wrap: wrap;
    }

    .event-date-badge {
        width: 100%;
        flex-direction: row;
        padding: 12px 20px;
    }

    .event-type-label {
        width: 100%;
        text-align: left;
        padding: 12px 24px;
        border-top: 1px solid #f1f5f9;
    }
}

@media (max-width: 768px) {
    .events-filters-row {
        flex-direction: column;
    }

    .events-search-box,
    .events-filter-select {
        width: 100%;
        min-width: unset;
    }

    .view-toggle-btn span {
        display: none;
    }

    .calendar-cell {
        min-height: 80px;
        font-size: 12px;
    }

    .calendar-event {
        font-size: 10px;
        padding: 2px 4px;
    }

    #event-detail-sidebar {
        width: 100%;
        right: -100%;
    }
}
@media (hover: hover) and (pointer: fine) {
    /* .view-toggle-btn:hover {
        background: #f8fafc;
        color: #1e202a;
    } */
    .event-list-card:hover {
        border-color: rgb(74, 111, 212, .5);
    }
}