/* =========================================================
   REVIEW POPUP
========================================================= */

.property-review-modal {
    position: fixed;
    z-index: 9999;
    inset: 0;

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

    padding: 24px;

    visibility: hidden;
    opacity: 0;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.property-review-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.property-review-modal-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(17, 17, 17, 0.55);
    backdrop-filter: blur(3px);
}


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

.property-review-dialog {
    position: relative;
    z-index: 1;

    width: min(620px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;

    padding: clamp(26px, 4vw, 42px);

    border: 1px solid rgba(17, 17, 17, 0.075);
    border-radius: 10px;

    background: #ffffff;

    box-shadow:
        0 24px 70px rgba(17, 17, 17, 0.18);

    transform: translateY(14px) scale(0.985);

    transition:
        transform 0.2s ease;
}

.property-review-modal.is-open .property-review-dialog {
    transform: translateY(0) scale(1);
}


/* Selika multicolour detail */
.property-review-dialog::before {
    content: "";

    position: absolute;
    top: 0;
    left: 36px;

    width: 68px;
    height: 3px;

    border-radius: 0 0 3px 3px;

    background:
        linear-gradient(
            to right,
            var(--color-primary) 0 14px,
            transparent 14px 18px,
            var(--color-secondary) 18px 32px,
            transparent 32px 36px,
            var(--color-third) 36px 50px,
            transparent 50px 54px,
            var(--color-raspberry) 54px 68px
        );
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.property-review-close {
    position: absolute;

    top: 16px;
    right: 18px;

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

    width: 36px;
    height: 36px;

    padding: 0;

    border: 1px solid rgba(17, 17, 17, 0.1);
    border-radius: 8px;

    background: #fbfcfb;
    color: rgba(17, 17, 17, 0.55);

    font-size: 1.45rem;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.property-review-close:hover {
    background: rgba(184, 50, 95, 0.06);
    border-color: rgba(184, 50, 95, 0.2);
    color: #b8325f;
}


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

.property-review-header {
    padding-right: 42px;
    margin-bottom: 30px;
}

.property-review-kicker {
    margin: 0 0 10px;

    color: #018d71;

    font-family: var(--font-accent);
    font-size: var(--fs-small);
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.property-review-header h2 {
    margin: 0;

    color: #111111;

    font-family: var(--font-main);
    font-size: var(--fs-title);
    line-height: 1.05;
    font-weight: 720;

    letter-spacing: -0.045em;
}

.property-review-header h2 span {
    color: #018d71;
}

.property-review-header > p:last-child {
    margin: 16px 0 0;

    max-width: 520px;

    color: rgba(17, 17, 17, 0.58);

    font-family: var(--font-main);
    font-size: var(--fs-body);
    line-height: 1.65;
}


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

.property-review-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.property-review-name-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.property-review-field {
    display: flex;
    flex-direction: column;
}

.property-review-field label {
    margin-bottom: 7px;

    color: #111111;

    font-family: var(--font-main);
    font-size: var(--fs-small);
    line-height: 1.2;
    font-weight: 600;
}


/* Django inputs */

.property-review-field input,
.property-review-field select,
.property-review-field textarea {
    width: 100%;
    min-height: 44px;

    padding: 11px 13px;

    border: 1px solid rgba(1, 141, 113, 0.22);
    border-radius: 8px;

    background: #ffffff;
    color: #111111;

    font-family: var(--font-main);
    font-size: var(--fs-small);

    outline: none;

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

.property-review-field textarea {
    min-height: 130px;
    resize: vertical;
}

.property-review-field input:hover,
.property-review-field select:hover,
.property-review-field textarea:hover {
    border-color: rgba(184, 50, 95, 0.30);
}

.property-review-field input:focus,
.property-review-field select:focus,
.property-review-field textarea:focus {
    border-color: #018d71;

    box-shadow:
        0 0 0 3px rgba(61, 199, 171, 0.12);
}


/* =========================================================
   STAR RATING
========================================================= */

.property-review-rating {
    display: flex;
    align-items: center;
    gap: 8px;

    min-height: 48px;
}

.property-review-star {
    padding: 0;

    border: none;
    background: transparent;

    color: rgba(17, 17, 17, 0.16);

    font-size: 2rem;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.15s ease,
        transform 0.15s ease;
}

.property-review-star:hover {
    transform: translateY(-2px) scale(1.05);
}

.property-review-star.is-active {
    color: #e2c900;
}


/*
The original Django IntegerField remains in the form,
but is controlled by the stars.
*/
.property-review-rating-input {
    display: none;
}


/* =========================================================
   ERRORS
========================================================= */

.property-review-form .errorlist {
    margin: 6px 0 0;
    padding: 0;

    list-style: none;

    color: #b8325f;

    font-family: var(--font-main);
    font-size: var(--fs-small);
    font-weight: 700;
}

.property-review-alert-error {
    padding: 12px 16px;

    border: 1px solid rgba(184, 50, 95, 0.18);
    border-radius: 8px;

    background: rgba(184, 50, 95, 0.055);
}


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

.property-review-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding-top: 4px;
}

.property-review-footer small {
    color: rgba(17, 17, 17, 0.5);

    font-family: var(--font-main);
    font-size: var(--fs-small);
}

.property-review-submit,
.property-review-open-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 12px 24px;

    border: 1px solid #b8325f;
    border-radius: 8px;

    background: #b8325f;
    color: #ffffff;

    font-family: var(--font-main);
    font-size: var(--fs-small);
    font-weight: 700;

    cursor: pointer;

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

.property-review-submit:hover,
.property-review-open-button:hover {
    background: #9f294f;
    border-color: #9f294f;

    transform: translateY(-1px);
}


/* Prevent page scrolling when modal is open */

body.review-modal-open {
    overflow: hidden;
}


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

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 640px) {
.property-review-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .property-review-dialog {
        width: 100%;
        max-height: calc(100vh - 24px);

        padding: 26px 20px 22px;
    }

    .property-review-dialog::before {
        left: 20px;
    }

    .property-review-name-grid {
        grid-template-columns: 1fr;
    }

    .property-review-header {
        padding-right: 32px;
    }

    .property-review-star {
        font-size: 1.85rem;
    }

    .property-review-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .property-review-submit {
        width: 100%;
    }
}
