/* =========================================================
   BEYOND REAL ESTATE
   EVENT POST COMPOSER
========================================================= */


/* =========================================================
   MODAL
========================================================= */

.event-post-modal {
    position: fixed;
    inset: 0;
    z-index: 9999999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.event-post-modal.open {
    display: flex;
}


/* =========================================================
   OVERLAY
========================================================= */

.event-post-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.65);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}


/* =========================================================
   DIALOG
========================================================= */

.event-post-dialog {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 40px);

    background: #fff;

    border-radius: 18px;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.25);

    animation:
        eventModalIn
        0.25s ease;
}


@keyframes eventModalIn {

    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


/* =========================================================
   HEADER
========================================================= */

.event-post-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding: 22px 24px;

    border-bottom: 1px solid #eee;

    background: #fff;
}


.event-post-header h2 {
    margin: 0;

    font-size: 21px;
    line-height: 1.3;

    font-weight: 700;

    color: #17251d;
}


.event-post-header p {
    margin: 6px 0 0;

    font-size: 13px;
    line-height: 1.5;

    color: #777;
}


.event-post-close {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    border: 0;
    border-radius: 50%;

    background: #f3f4f3;

    color: #333;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        background .2s ease,
        transform .2s ease;
}


.event-post-close:hover {
    background: #e7e9e7;

    transform: rotate(90deg);
}


/* =========================================================
   BODY
========================================================= */

.event-post-body {
    flex: 1;

    overflow-y: auto;

    padding: 24px;

    background: #fff;
}


/* =========================================================
   EVENT IMAGE DROP ZONE
========================================================= */

.event-image-drop-zone {
    position: relative;

    min-height: 210px;

    border: 2px dashed #cbd6cf;

    border-radius: 16px;

    background: #f8faf9;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    padding: 25px;

    transition:
        border-color .2s ease,
        background .2s ease,
        transform .2s ease;
}


.event-image-drop-zone:hover {
    border-color: #176b3a;

    background: #f3f8f4;
}


.event-image-drop-zone.drag-over {
    border-color: #176b3a;

    background: #edf7f0;

    transform: scale(1.01);
}


/* =========================================================
   EVENT UPLOAD ICON
========================================================= */

.event-upload-icon {
    width: 58px;
    height: 58px;

    margin-bottom: 12px;

    border-radius: 50%;

    background: #e8f4ec;

    color: #176b3a;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 24px;
}


.event-image-drop-zone h3 {
    margin: 0 0 5px;

    color: #1c2921;

    font-size: 17px;

    font-weight: 700;
}


.event-image-drop-zone p {
    margin: 0 0 15px;

    color: #777;

    font-size: 13px;
}


/* =========================================================
   SELECT IMAGE BUTTON
========================================================= */

.event-select-image-btn {
    border: 0;

    padding: 11px 18px;

    border-radius: 9px;

    background: #176b3a;

    color: #fff;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    transition:
        background .2s ease,
        transform .2s ease;
}


.event-select-image-btn:hover {
    background: #12582f;

    transform: translateY(-1px);
}


.event-select-image-btn:active {
    transform: translateY(0);
}


.event-upload-hint {
    display: block;

    margin-top: 12px;

    color: #999;

    font-size: 11px;
}


/* =========================================================
   EVENT IMAGE PREVIEW
========================================================= */

.event-image-preview-container {
    position: relative;

    margin-bottom: 22px;

    border-radius: 16px;

    overflow: hidden;

    background: #111;
}


.event-image-preview-container[hidden] {
    display: none;
}


.event-image-preview-wrapper {
    position: relative;

    width: 100%;

    max-height: 360px;

    background: #111;

    display: flex;
    justify-content: center;
    align-items: center;
}


#eventPostImagePreview {
    display: block;

    width: 100%;
    max-height: 360px;

    object-fit: cover;
}


/* =========================================================
   REMOVE IMAGE
========================================================= */

.event-remove-image-btn {
    position: absolute;

    top: 12px;
    right: 12px;

    width: 38px;
    height: 38px;

    border: 0;

    border-radius: 50%;

    background: rgba(0, 0, 0, .7);

    color: #fff;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;

    transition:
        background .2s ease,
        transform .2s ease;
}


.event-remove-image-btn:hover {
    background: #dc3545;

    transform: scale(1.05);
}


/* =========================================================
   IMAGE INFORMATION
========================================================= */

.event-image-metadata {
    display: flex;
    align-items: center;

    justify-content: space-between;

    gap: 10px;

    padding: 10px 13px;

    background: #f7f8f7;

    border-top: 1px solid #e7e7e7;

    font-size: 12px;

    color: #666;
}


#eventImageFileName {
    flex: 1;

    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-weight: 600;

    color: #333;
}


/* =========================================================
   FORM GROUP
========================================================= */

.event-form-group {
    margin-bottom: 20px;
}


.event-form-group label {
    display: block;

    margin-bottom: 8px;

    font-size: 14px;

    font-weight: 600;

    color: #26332b;
}


.event-form-group textarea,
.event-form-group input,
.event-form-group select {
    width: 100%;

    box-sizing: border-box;

    border: 1px solid #d9dfda;

    border-radius: 10px;

    background: #fff;

    color: #222;

    font-size: 14px;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}


.event-form-group textarea {
    min-height: 110px;

    padding: 12px 13px;

    resize: vertical;
}


.event-form-group input,
.event-form-group select {
    height: 46px;

    padding: 0 13px;
}


.event-form-group textarea:focus,
.event-form-group input:focus,
.event-form-group select:focus {
    border-color: #176b3a;

    box-shadow:
        0 0 0 3px rgba(23, 107, 58, .10);
}


/* =========================================================
   DESCRIPTION FOOTER
========================================================= */

.event-description-footer {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-top: 6px;

    font-size: 11px;

    color: #888;
}


#eventDescriptionCount {
    white-space: nowrap;

    font-weight: 600;
}


/* =========================================================
   EVENT DATE / TIME ROW
========================================================= */

.event-date-time-row {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 14px;
}


.event-date-time-row .event-form-group {
    margin-bottom: 20px;
}


/* =========================================================
   EVENT LOCATION
========================================================= */

.event-location-input {
    position: relative;
}


.event-location-input i {
    position: absolute;

    left: 13px;

    top: 50%;

    transform: translateY(-50%);

    color: #176b3a;

    pointer-events: none;
}


.event-location-input input {
    padding-left: 38px;
}


/* =========================================================
   EVENT STATUS
========================================================= */

.event-upload-status {
    padding: 11px 13px;

    margin-bottom: 18px;

    border-radius: 9px;

    font-size: 13px;

    line-height: 1.5;
}


.event-upload-status[hidden] {
    display: none;
}


.event-upload-status.error {
    background: #fff0f0;

    color: #b42318;

    border: 1px solid #f5c2c0;
}


.event-upload-status.success {
    background: #edf8f0;

    color: #176b3a;

    border: 1px solid #c8e6d0;
}


.event-upload-status.loading {
    background: #f0f5ff;

    color: #2457a6;

    border: 1px solid #ceddf7;
}


/* =========================================================
   PROGRESS
========================================================= */

.event-upload-progress {
    margin-top: 10px;

    padding: 15px;

    border-radius: 12px;

    background: #f7f9f7;

    border: 1px solid #e4e9e5;
}


.event-upload-progress[hidden] {
    display: none;
}


.event-progress-top,
.event-progress-bottom {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;
}


.event-progress-top {
    margin-bottom: 9px;

    font-size: 12px;

    color: #555;
}


.event-progress-top strong {
    color: #176b3a;
}


.event-progress-track {
    width: 100%;

    height: 7px;

    overflow: hidden;

    border-radius: 99px;

    background: #e1e6e2;
}


.event-progress-bar {
    width: 0;

    height: 100%;

    border-radius: inherit;

    background: #176b3a;

    transition: width .15s ease;
}


.event-progress-bottom {
    margin-top: 8px;

    font-size: 11px;

    color: #888;
}


/* =========================================================
   FOOTER
========================================================= */

.event-post-footer {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    padding: 16px 24px;

    border-top: 1px solid #eee;

    background: #fff;
}


/* =========================================================
   CANCEL BUTTON
========================================================= */

.event-cancel-btn {
    min-height: 43px;

    padding: 0 18px;

    border: 1px solid #d8ddd9;

    border-radius: 9px;

    background: #fff;

    color: #555;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease;
}


.event-cancel-btn:hover {
    background: #f5f6f5;

    border-color: #c6ccc8;
}


/* =========================================================
   PUBLISH BUTTON
========================================================= */

.event-submit-btn {
    min-height: 43px;

    padding: 0 20px;

    border: 0;

    border-radius: 9px;

    background: #176b3a;

    color: #fff;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    transition:
        background .2s ease,
        transform .2s ease,
        opacity .2s ease;
}


.event-submit-btn:hover:not(:disabled) {
    background: #12582f;

    transform: translateY(-1px);
}


.event-submit-btn:disabled {
    opacity: .5;

    cursor: not-allowed;

    transform: none;
}


.event-submit-btn.uploading {
    cursor: wait;

    opacity: .8;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .event-post-modal {
        padding: 0;
    }


    .event-post-dialog {
        width: 100%;

        max-width: none;

        max-height: 100vh;

        height: 100vh;

        border-radius: 0;
    }


    .event-post-header {
        padding: 18px;
    }


    .event-post-header h2 {
        font-size: 19px;
    }


    .event-post-body {
        padding: 18px;
    }


    .event-post-footer {
        padding: 13px 18px;
    }


    .event-image-drop-zone {
        min-height: 190px;
    }


    .event-date-time-row {
        grid-template-columns: 1fr;
        gap: 0;
    }


    .event-submit-btn,
    .event-cancel-btn {
        flex: 1;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .event-post-footer {
        gap: 8px;
    }


    .event-submit-btn,
    .event-cancel-btn {
        padding-left: 12px;
        padding-right: 12px;

        font-size: 13px;
    }


    .event-image-drop-zone {
        padding: 20px 15px;
    }

}






/* =========================================================
   BEYOND REAL ESTATE
   EVENT POST CARD
========================================================= */

/* ---------------------------------------------------------
   EVENT CONTENT CONTAINER
--------------------------------------------------------- */

.post-event-content {
    margin: 16px 0 0;
    padding: 18px;
    background: #f8faf9;
    border: 1px solid #e2e8e5;
    border-radius: 14px;
    position: relative;
}


/* ---------------------------------------------------------
   EVENT LABEL
--------------------------------------------------------- */

.post-event-content .event-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;

    color: #198754;

    background: #e8f5ee;

    padding: 5px 9px;

    border-radius: 20px;

    margin-bottom: 10px;
}

.post-event-content .event-label i {
    font-size: 12px;
}


/* ---------------------------------------------------------
   EVENT TITLE
--------------------------------------------------------- */

.post-event-content .event-title {
    margin: 0 0 15px;

    font-size: 21px;
    line-height: 1.3;

    font-weight: 750;

    color: #17221d;

    word-break: break-word;
}


/* ---------------------------------------------------------
   EVENT DETAILS
--------------------------------------------------------- */

.post-event-content .event-detail {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    margin-top: 10px;

    font-size: 14px;
    line-height: 1.45;

    color: #46534d;
}


/* ---------------------------------------------------------
   EVENT DETAIL ICON
--------------------------------------------------------- */

.post-event-content .event-detail i {
    flex: 0 0 20px;

    width: 20px;

    margin-top: 2px;

    font-size: 15px;

    color: #198754;

    text-align: center;
}


/* ---------------------------------------------------------
   EVENT DETAIL TEXT
--------------------------------------------------------- */

.post-event-content .event-detail span {
    flex: 1;

    min-width: 0;

    word-break: break-word;
}


/* ---------------------------------------------------------
   EVENT LOCATION
   In case your event markup contains this
--------------------------------------------------------- */

.post-event-content .event-location {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    margin-top: 10px;

    font-size: 14px;

    color: #46534d;
}

.post-event-content .event-location i {
    width: 20px;

    flex: 0 0 20px;

    margin-top: 2px;

    text-align: center;

    color: #198754;
}


/* ---------------------------------------------------------
   EVENT DESCRIPTION
--------------------------------------------------------- */

.post-event-content .event-description {
    margin-top: 15px;
    padding-top: 14px;

    border-top: 1px solid #e2e8e5;

    font-size: 14px;
    line-height: 1.65;

    color: #53615a;
}


/* ---------------------------------------------------------
   EVENT ACTION / CTA
--------------------------------------------------------- */

.post-event-content .event-action {
    margin-top: 16px;
}

.post-event-content .event-action a,
.post-event-content .event-action button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    min-height: 40px;

    padding: 9px 16px;

    border: 0;
    border-radius: 9px;

    background: #198754;
    color: #fff;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.post-event-content .event-action a:hover,
.post-event-content .event-action button:hover {
    background: #157347;
    transform: translateY(-1px);
}


/* ---------------------------------------------------------
   EVENT MEDIA + DETAILS SPACING
--------------------------------------------------------- */

.social-post .post-media + .post-event-content {
    margin-top: 14px;
}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 600px) {

    .post-event-content {
        margin-top: 13px;
        padding: 15px;
        border-radius: 12px;
    }

    .post-event-content .event-title {
        font-size: 18px;
        margin-bottom: 13px;
    }

    .post-event-content .event-detail {
        font-size: 13px;
        gap: 8px;
    }

    .post-event-content .event-detail i {
        width: 18px;
        flex-basis: 18px;
        font-size: 14px;
    }

    .post-event-content .event-label {
        font-size: 10px;
        padding: 4px 8px;
    }

}


/* ---------------------------------------------------------
   DARK MODE SUPPORT
--------------------------------------------------------- */

@media (prefers-color-scheme: dark) {

    .post-event-content {
        background: #18201c;
        border-color: #29342e;
    }

    .post-event-content .event-title {
        color: #f1f5f3;
    }

    .post-event-content .event-detail,
    .post-event-content .event-location {
        color: #b9c5bf;
    }

    .post-event-content .event-description {
        color: #aebbb4;
        border-top-color: #29342e;
    }

    .post-event-content .event-label {
        background: #193b2b;
        color: #65d39b;
    }

}


