/*----------------------------------------------------
Events & Meetups Styles
---------------------------------------------------- */

.events-calendar-area {
    position: relative;
    overflow: hidden;

    &::before {
        content: '';
        position: absolute;
        width: 600px;
        height: 600px;
        background: radial-gradient(circle, rgba($brand_color, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
        top: -100px;
        right: -100px;
        z-index: -1;
    }

    .calendar-wrapper {
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 30px;
        padding: 50px;
        box-shadow: 0 40px 100px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.8);
        position: relative;
        z-index: 5;

        &::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.5) 100%);
            border-radius: 32px;
            z-index: -1;
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask-composite: exclude;
            -webkit-mask-composite: destination-out;
        }
    }

    .calendar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 40px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding-bottom: 25px;

        .current-month {
            font-size: 32px;
            font-weight: 800;
            color: $h_title;
            margin: 0;
            letter-spacing: -1px;

            span {
                color: $brand_color;
                margin-left: 10px;
                font-weight: 400;
            }
        }

        .calendar-nav {
            display: flex;
            gap: 15px;

            button {
                width: 50px;
                height: 50px;
                border-radius: 15px;
                border: 1px solid rgba(0, 0, 0, 0.05);
                background: #fff;
                color: $black_800;
                transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
                font-size: 18px;
                display: flex;
                align-items: center;
                justify-content: center;

                &:hover {
                    background: $brand_color;
                    color: #fff;
                    border-color: $brand_color;
                    transform: translateY(-5px);
                    box-shadow: 0 10px 20px rgba($brand_color, 0.3);
                }

                &:active {
                    transform: scale(0.95);
                }
            }
        }
    }

    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 20px;

        .day-name {
            text-align: center;
            font-weight: 800;
            color: $black_800;
            text-transform: uppercase;
            font-size: 12px;
            letter-spacing: 2px;
            padding-bottom: 20px;
            opacity: 0.6;
        }

        .calendar-day {
            min-height: 140px;
            background: rgba(255, 255, 255, 0.75);
            border-radius: 20px;
            padding: 15px;
            border: 1px solid rgba(255, 255, 255, 0.5);
            transition: all 0.3s ease;
            position: relative;
            display: flex;
            flex-direction: column;

            &:hover {
                background: #fff;
                box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
                transform: translateY(-8px) scale(1.02);
                border-color: rgba($brand_color, 0.2);
                z-index: 10;
            }

            &.not-current {
                opacity: 0.2;
                filter: grayscale(1);
            }

            &.today {
                border-color: $brand_color;
                background: rgba($brand_color, 0.03);
                box-shadow: 0 0 0 4px rgba($brand_color, 0.05);

                .date {
                    background: $brand_color;
                    color: #fff;
                    box-shadow: 0 5px 15px rgba($brand_color, 0.4);
                }
            }

            .date {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 34px;
                height: 34px;
                border-radius: 10px;
                font-weight: 800;
                font-size: 15px;
                margin-bottom: 12px;
                transition: $transition;
                color: $black_800;
                background: rgba(255, 255, 255, 0.8);
            }

            .event-list {
                flex-grow: 1;
                display: flex;
                flex-direction: column;
                gap: 6px;
            }

            .event-item {
                font-size: 11px;
                font-weight: 800;
                padding: 8px 12px;
                border-radius: 12px;
                background: linear-gradient(135deg, $brand_color 0%, #f2709c 100%);
                color: #fff;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                cursor: pointer;
                transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
                box-shadow: 0 5px 15px rgba($brand_color, 0.2);
                border: none;

                &:hover {
                    transform: translateX(4px);
                    filter: brightness(1.1);
                    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
                }

                &.meetup {
                    background: #00d285;
                }

                &.party {
                    background: #8b5cf6;
                }

                &.more {
                    background: transparent;
                    color: $black_400;
                    border: 1px dashed $black_200;
                    text-align: center;
                    border-left: none;
                }
            }
        }
    }
}

/* Event Card (List View) */
.event-card {
    @include glass-panel(rgba(255, 255, 255, 0.9), blur(10px));
    border-radius: 20px;
    overflow: hidden;
    transition: $transition;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);

    &:hover {
        transform: translateY(-10px);
        box-shadow: var(--bs_lg);

        .event-img img {
            transform: scale(1.1);
        }
    }

    .event-img {
        height: 220px;
        overflow: hidden;
        position: relative;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.6s ease;
        }

        .event-badge {
            position: absolute;
            top: 15px;
            left: 15px;
            padding: 6px 15px;
            border-radius: 30px;
            background: rgba(255, 255, 255, 0.9);
            color: $brand_color;
            font-weight: 700;
            font-size: 12px;
            text-transform: uppercase;
            box-shadow: var(--bs_sm);
        }

        .event-date-tag {
            position: absolute;
            bottom: 15px;
            right: 15px;
            background: $brand_color;
            color: #fff;
            padding: 5px 12px;
            border-radius: 8px;
            text-align: center;
            line-height: 1.2;

            span {
                display: block;
                font-weight: 800;
                font-size: 18px;
            }

            small {
                font-weight: 600;
                font-size: 10px;
                text-transform: uppercase;
            }
        }
    }

    .event-content {
        padding: 25px;

        .event-title {
            font-size: 20px;
            font-weight: 800;
            margin-bottom: 15px;
            color: $h_title;
            text-decoration: none;
            display: block;

            &:hover {
                color: $brand_color;
            }
        }

        .event-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;

            div {
                font-size: 14px;
                color: $black_500;
                display: flex;
                align-items: center;
                gap: 8px;

                i {
                    color: $brand_color;
                }
            }
        }

        .event-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 15px;
            border-top: 1px solid $black_50;

            .attendees {
                display: flex;
                align-items: center;

                .avatar-group {
                    display: flex;
                    margin-right: 10px;

                    img {
                        width: 30px;
                        height: 30px;
                        border-radius: 50%;
                        border: 2px solid #fff;
                        margin-left: -10px;

                        &:first-child {
                            margin-left: 0;
                        }
                    }
                }

                span {
                    font-size: 13px;
                    color: $black_600;
                    font-weight: 600;
                }
            }
        }
    }
}

/* Single Event Page */
.event-single-area {
    padding-bottom: 100px;

    .event-main-img {
        width: 100%;
        height: 500px;
        border-radius: 24px;
        object-fit: cover;
        margin-bottom: 40px;
        box-shadow: var(--bs_lg);
    }

    .event-info-box {
        @include glass-panel(rgba(255, 255, 255, 0.9), blur(20px));
        border-radius: 24px;
        padding: 40px;
        margin-bottom: 40px;
        border: 1px solid rgba(255, 255, 255, 0.5);

        .event-title {
            font-size: 36px;
            font-weight: 800;
            margin-bottom: 20px;
        }

        .event-description {
            font-size: 16px;
            line-height: 1.8;
            color: $black_600;
            margin-bottom: 30px;
        }
    }

    .event-sidebar {
        position: sticky;
        top: 100px;

        .event-booking-card {
            @include glass-panel(#fff, blur(10px));
            border-radius: 24px;
            padding: 30px;
            box-shadow: var(--bs_lg);
            border: 1px solid $black_50;

            .price {
                font-size: 32px;
                font-weight: 800;
                color: $brand_color;
                margin-bottom: 20px;

                small {
                    font-size: 16px;
                    color: $black_500;
                    font-weight: 600;
                }
            }

            .countdown-timer {
                display: flex;
                gap: 15px;
                margin-bottom: 30px;

                .timer-item {
                    text-align: center;
                    flex: 1;

                    span {
                        display: block;
                        font-size: 24px;
                        font-weight: 800;
                        color: $h_title;
                    }

                    small {
                        font-size: 11px;
                        text-transform: uppercase;
                        color: $black_400;
                        font-weight: 700;
                    }
                }
            }
        }
    }
}

/* Event Create Page */
.event-create-area {
    position: relative;
    overflow: hidden;

    &::before {
        content: '';
        position: absolute;
        width: 600px;
        height: 600px;
        background: radial-gradient(circle, rgba($brand_color, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
        top: -100px;
        right: -100px;
        z-index: -1;
    }

    .intro-section {
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 30px;
        padding: 60px;
        border: 1px solid rgba(255, 255, 255, 0.8);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
        margin-bottom: 80px;

        .intro-text {
            h1 {
                font-size: 52px;
                line-height: 1.1;
                margin-bottom: 25px;
                letter-spacing: -2px;

                span {
                    color: $brand_color;
                    position: relative;
                    display: inline-block;

                    &::after {
                        content: '';
                        position: absolute;
                        bottom: 8px;
                        left: 0;
                        width: 100%;
                        height: 8px;
                        background: rgba($brand_color, 0.1);
                        z-index: -1;
                    }
                }
            }

            p {
                font-size: 18px;
                color: $black_600;
                line-height: 1.8;
            }
        }

        .intro-img {
            text-align: center;

            img {
                max-height: 350px;
                filter: drop-shadow(0 20px 40px rgba($brand_color, 0.2));
                animation: float 6s ease-in-out infinite;
            }
        }
    }

    .create-form-wrapper {
        background: rgb(255 255 255 / 28%);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border-radius: 40px;
        padding: 60px;
        box-shadow: 0 50px 100px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255, 255, 255, 1);
        position: relative;

        .form-title {
            font-size: 36px;
            font-weight: 800;
            margin-bottom: 50px;
            text-align: center;
            color: $h_title;
        }

        .form-group-custom {
            margin-bottom: 30px;

            label {
                font-size: 15px;
                font-weight: 700;
                color: $h_title;
                margin-bottom: 12px;
                display: block;
                padding-left: 5px;

                i {
                    color: $brand_color;
                    margin-right: 8px;
                    font-size: 14px;
                }
            }

            .form-control {
                height: 60px;
                border-radius: 18px;
                border: 1px solid rgba($black_800, 0.08);
                padding: 0 25px;
                font-size: 15px;
                transition: all 0.3s ease;
                background: rgb(255 255 255 / 77%);

                &:focus {
                    background: #fff;
                    border-color: $brand_color;
                    box-shadow: 0 10px 20px rgba($brand_color, 0.08);
                    transform: translateY(-2px);
                }
            }

            select.form-control {
                appearance: none;
                -webkit-appearance: none;
                -moz-appearance: none;
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23e94057' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
                background-repeat: no-repeat;
                background-position: right 25px center;
                background-size: 18px;
                padding-right: 50px;
                cursor: pointer;
            }

            textarea.form-control {
                height: auto;
                padding: 20px 25px;
            }

            .input-group {
                border-radius: 18px;
                overflow: hidden;
                box-shadow: none;

                .input-group-text {
                    border: 1px solid rgba($black_800, 0.08);
                    border-right: none;
                    background: rgba(255, 255, 255, 0.5);
                    padding: 0 20px;
                    color: $brand_color;
                }

                .form-control {
                    border-left: none;
                }
            }
        }
    }

    .image-upload-box {
        width: 100%;
        height: 300px;
        border: 2px dashed rgba($black_800, 0.1);
        border-radius: 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        margin-bottom: 40px;
        background: rgba(255, 255, 255, 0.4);
        position: relative;
        overflow: hidden;

        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba($brand_color, 0.02);
            opacity: 0;
            transition: 0.4s;
        }

        &:hover {
            border-color: $brand_color;
            transform: scale(1.01);
            background: #fff;

            &::before {
                opacity: 1;
            }

            i {
                color: $brand_color;
                transform: translateY(-10px);
            }
        }

        i {
            font-size: 64px;
            color: $black_200;
            margin-bottom: 20px;
            transition: 0.4s;
        }

        span {
            font-weight: 800;
            font-size: 18px;
            color: $h_title;
        }

        small {
            font-weight: 600;
            color: $black_400;
        }
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@media (max-width: 991px) {
    .events-calendar-area .calendar-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .event-create-area .intro-section {
        padding: 40px;
    }
}

@media (max-width: 575px) {
    .events-calendar-area .calendar-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .event-create-area .create-form-wrapper {
        padding: 30px;
    }
}