/* =========================
MODALS — PROKKAT STYLE
========================= */





.modal-overlay,
#rent-modal-overlay,
#rental-request-overlay,
#checkout-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.54);
    backdrop-filter: blur(0.8rem);
    -webkit-backdrop-filter: blur(0.8rem);
    overflow: hidden;
    overscroll-behavior: contain;
}

.modal-overlay.on,
#rent-modal-overlay.on,
#rental-request-overlay.on,
#checkout-overlay.on {
    display: flex;
}

/* box */

.modal-box,
.rent-modal-box,
.checkout-box {
    position: relative;
    width: 100%;
    max-width: 56rem;
    max-height: calc(100vh - 4rem);
    max-height: calc(100dvh - 4rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 3rem;
    background: #fff;
    color: #000;
    box-shadow: 0 3rem 9rem rgba(0, 0, 0, 0.35);
    animation: modalIn 0.22s ease;
}

.checkout-box {
    max-width: 68rem;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
}

.rent-modal-box > .mafic-form,
.checkout-box > .mafic-form {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
}

.checkout-box > .mafic-form {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(1.4rem) scale(0.98);
    }

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

/* decorative top line */

.modal-box::before,
.rent-modal-box::before,
.checkout-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 2.4rem;
    right: 2.4rem;
    height: 0.4rem;
    border-radius: 0 0 99rem 99rem;
    background: var(--yellow);
}

/* headers */

.modal-head,
.rent-modal-head,
.checkout-head {
    padding: 2.8rem 3rem 2rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    border-bottom: 0.1rem solid rgba(0, 0, 0, 0.08);
    background:
        radial-gradient(circle at 92% 0%, rgba(255, 225, 106, 0.28), transparent 34%),
        #fff;
}

.modal-head-title,
.rent-modal-title,
.checkout-title {
    margin: 0;
    color: #000;
    font-size: 2.6rem;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.rent-modal-sub {
    margin-top: 0.8rem;
    max-width: 38rem;
    color: rgba(0, 0, 0, 0.55);
    font-size: 1.45rem;
    line-height: 1.45;
    font-weight: 400;
}

/* close */

.modal-close-x {
    width: 4rem;
    height: 4rem;
    flex: 0 0 4rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f4f4f4;
    color: #000;
    border: 0.1rem solid rgba(0, 0, 0, 0.08);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    transition: 0.18s ease;
}

.modal-close-x:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    transform: rotate(90deg);
}

/* body */

.modal-body,
.rent-modal-body,
.checkout-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 2.4rem 3rem;
}

.checkout-body {
    flex: 0 0 auto;
    overflow: visible;
    padding: 1.4rem 2.4rem;
}

.modal-body::-webkit-scrollbar,
.rent-modal-body::-webkit-scrollbar,
.checkout-body::-webkit-scrollbar {
    width: 0.6rem;
}

.modal-body::-webkit-scrollbar-thumb,
.rent-modal-body::-webkit-scrollbar-thumb,
.checkout-body::-webkit-scrollbar-thumb {
    border-radius: 99rem;
    background: rgba(0, 0, 0, 0.16);
}

/* auth panes */

.auth-pane {
    display: none;
}

.auth-pane.is-active {
    display: block;
    animation: modalPaneIn 0.18s ease;
}

@keyframes modalPaneIn {
    from {
        opacity: 0;
        transform: translateY(0.6rem);
    }

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

/* footer */

.modal-foot,
.rent-modal-foot,
.checkout-foot {
    padding: 2rem 3rem 2.4rem;
    border-top: 0.1rem solid rgba(0, 0, 0, 0.08);
    background:
        radial-gradient(circle at 10% 100%, rgba(255, 225, 106, 0.24), transparent 30%),
        var(--bg-warm);
}

.checkout-foot {
    padding: 1.3rem 2.4rem 1.6rem;
    flex: 0 0 auto;
}

.rent-modal-foot {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1.6rem;
}

.add-listing-modal-box .rent-modal-body {
    display: grid;
    gap: 1.4rem;
}

.add-listing-placeholder {
    padding: 3rem;
    justify-items: start;
}

.add-listing-placeholder__icon {
    width: 5.6rem;
    height: 5.6rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--yellow);
    color: #000;
    font-size: 3.2rem;
    font-weight: 600;
    line-height: 1;
}

.add-listing-placeholder__title {
    max-width: 42rem;
    color: #000;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
}

.add-listing-placeholder__text {
    max-width: 44rem;
    margin: 0.8rem 0 0;
    color: rgba(0, 0, 0, 0.58);
    font-size: 1.45rem;
    line-height: 1.5;
}

.add-listing-modal-box .add-listing-form-row {
    grid-template-columns: 1fr;
}

.add-listing-modal-box .form-field {
    min-width: 0;
}

.add-listing-modal-box .add-listing-modal-foot {
    margin-top: 0.4rem;
    padding: 0;
    border-top: 0;
}

.rent-modal-foot.modal-inline-foot,
.checkout-foot.modal-inline-foot {
    margin-top: 1.4rem;
    padding: 0;
    border-top: 0;
    background: none;
}

.rent-modal-note,
.checkout-note {
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.25rem;
    line-height: 1.45;
}

.rental-request-product {
    margin-bottom: 1.8rem;
    padding: 1.4rem 1.6rem;
    border: 0.1rem solid rgba(0, 0, 0, 0.08);
    border-radius: 1.4rem;
    background: var(--bg-warm);
}

.rental-request-product__label {
    margin-bottom: 0.5rem;
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    line-height: 1.2;
    text-transform: uppercase;
}

.rental-request-product__name {
    color: #000;
    font-size: 1.65rem;
    line-height: 1.25;
    font-weight: 700;
}

.rental-request-product__price {
    margin-top: 0.4rem;
    color: rgba(0, 0, 0, 0.56);
    font-size: 1.35rem;
    line-height: 1.35;
}

/* fields */

.form-field,
.co-field {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-bottom: 1.5rem;
}

.form-label,
.co-label,
.checkout-block-title {
    color: rgba(0, 0, 0, 0.52);
    font-size: 1.1rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.field-hint {
    color: rgba(0, 0, 0, 0.54);
    font-size: 1.42rem;
    line-height: 1.45;
}

.auth-pane-intro {
    margin: -0.2rem 0 1.8rem;
}

.modal-input,
.co-input {
    width: 100%;
    height: 5rem;
    padding: 0 1.5rem;
    border: 0.1rem solid rgba(0, 0, 0, 0.12);
    border-radius: 1.4rem;
    background: #fff;
    color: #000;
    font-size: 1.55rem;
    font-weight: 500;
    outline: none;
    transition: 0.18s ease;
}

.checkout-box .co-field {
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}

.checkout-box .co-input {
    height: 4.4rem;
    padding-inline: 1.3rem;
    border-radius: 1.1rem;
    font-size: 1.45rem;
}

textarea.modal-input {
    height: 11rem;
    padding-top: 1.3rem;
    resize: vertical;
    line-height: 1.45;
}

.modal-input::placeholder,
.co-input::placeholder {
    color: rgba(0, 0, 0, 0.34);
    font-weight: 400;
}

.modal-input:focus,
.co-input:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 0.4rem rgba(255, 225, 106, 0.26);
}

/* select */

select.modal-input {
    appearance: none;
    cursor: pointer;
    padding-right: 4rem;
    background:
        url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        no-repeat right 1.6rem center / 1.2rem 0.8rem,
        #fff;
}

/* rows */

.rent-form-row,
.checkout-fields,
.co-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
}

.field-full {
    grid-column: 1 / -1;
}

/* links */

.modal-links {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 1.4rem;
    margin-top: 0.2rem;
    margin-bottom: 2rem;

    flex-wrap: wrap;
}



.modal-links .btn-ghost,
.btn-ghost {
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(0, 0, 0, 0.58);
    font-size: 1.4rem;
    line-height: 1.2;
    font-weight: 500;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: 0.18s ease;
}

.modal-links .btn-ghost:hover,
.btn-ghost:hover {
    color: #000;
}

/* buttons */

.btn,
.btn-primary,
.btn-secondary {
    min-height: 4.8rem;
    padding: 0 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    border: 0;
    border-radius: 1.3rem;
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: 0.18s ease;
}

.btn-primary {
    background: var(--yellow);
    color: #000;
}

.btn-primary:hover {
    background: var(--yellow-hover);
    transform: translateY(-0.1rem);
}

.btn-secondary {
    background: #fff;
    color: #000;
    border: 0.1rem solid rgba(0, 0, 0, 0.12);
}

.btn-secondary:hover {
    background: var(--yellow-soft);
    border-color: var(--yellow);
}

.option-pill {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.2rem 1.4rem;
    border: 0.1rem solid rgba(0, 0, 0, 0.1);
    border-radius: 1.4rem;
    background: #fff;
    cursor: pointer;
    color: #000;
    font-size: 1.4rem;
    line-height: 1.4;
    font-weight: 500;
}

.option-pill input {
    width: 1.8rem;
    height: 1.8rem;
    margin: 0.1rem 0 0;
    flex: 0 0 1.8rem;
    accent-color: var(--yellow);
}

#auth-status-box {
    margin-top: 1.4rem;
    padding: 1.2rem 1.4rem;
    border-radius: 1.4rem;
    background: var(--yellow-soft);
}

/* checkout */

.checkout-block {
    padding: 1.3rem 0;
    border-bottom: 0.1rem solid rgba(0, 0, 0, 0.08);
}

.checkout-block:first-child {
    padding-top: 0;
}

.checkout-block:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.checkout-block-title {
    margin-bottom: 0.9rem;
}

.checkout-add-btn {
    margin-top: 0.8rem;
    width: 100%;
    height: 4rem;
    border: 0;
    border-radius: 1.2rem;
    background: var(--yellow-soft);
    color: #000;
    font-size: 1.45rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
}

.checkout-add-btn:hover {
    background: var(--yellow);
}

.checkout-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: 0.8rem;
    cursor: default;
    user-select: none;
}

.checkout-consent input {
    width: 1.8rem;
    height: 1.8rem;
    margin-top: 0.15rem;
    accent-color: var(--yellow);
    flex-shrink: 0;
    cursor: pointer;
}

.checkout-consent span {
    color: rgba(0, 0, 0, 0.58);
    font-size: 1.25rem;
    line-height: 1.35;
}

.checkout-consent u,
.checkout-consent a {
    color: #000;
    text-decoration-thickness: 0.1rem;
    text-underline-offset: 0.25rem;
}

.checkout-consent a:hover {
    color: var(--red);
}

.checkout-total {
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
}

.checkout-total-label {
    color: rgba(0, 0, 0, 0.58);
    font-size: 1.45rem;
    font-weight: 500;
}

.checkout-total-val {
    color: #000;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.checkout-submit {
    width: 100%;
    min-height: 4.4rem;
    font-size: 1.55rem;
}

.checkout-foot .checkout-note {
    margin-top: 0.8rem;
    font-size: 1.15rem;
    line-height: 1.35;
}

/* cart items inside checkout */

.co-item {
    position: relative;
    padding: 0.8rem 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    border-bottom: 0.1rem solid rgba(0, 0, 0, 0.08);
}

.co-item:last-child {
    border-bottom: 0;
}

.co-item--cart {
    padding-right: 3.8rem;
}

.co-item__main {
    min-width: 0;
    display: flex;
    gap: 0.9rem;
}

.co-item__image {
    width: 5rem;
    height: 5rem;
    flex: 0 0 5rem;
    object-fit: cover;
    border-radius: 1.2rem;
    background: #f4f4f4;
}

.co-item__content {
    min-width: 0;
}

.co-item__name {
    color: #000;
    font-size: 1.45rem;
    line-height: 1.3;
    font-weight: 700;
}

.co-item__meta {
    margin-top: 0.3rem;
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.25rem;
}

.co-item__controls {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.co-item__qty-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: #f3f3f3;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: 0.18s ease;
}

.co-item__qty-btn:hover {
    background: var(--yellow);
}

.co-item__qty-val {
    min-width: 4.8rem;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}

.co-item__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
}

.co-item__sum {
    font-size: 1.35rem;
    font-weight: 800;
    white-space: nowrap;
}

.co-item__remove {
    position: absolute;
    top: 0.8rem;
    right: 0;
    width: 2.9rem;
    height: 2.9rem;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f3f3f3;
    color: #000;
    cursor: pointer;
    transition: 0.18s ease;
}

.co-item__remove:hover {
    background: var(--yellow);
}

/* mobile */

@media (max-width: 760px) {
    .modal-overlay,
    #rent-modal-overlay,
    #rental-request-overlay,
    #checkout-overlay {
        padding: 1rem;
        align-items: flex-end;
    }

    .modal-box,
    .rent-modal-box,
    .checkout-box {
        max-width: none;
        max-height: calc(100dvh - 2rem);
        border-radius: 2.4rem 2.4rem 0 0;
    }

    .modal-head,
    .rent-modal-head,
    .checkout-head {
        padding: 2.4rem 2rem 1.8rem;
    }

    .checkout-head {
        padding: 1.8rem 1.6rem 1.2rem;
    }

    .modal-head-title,
    .rent-modal-title,
    .checkout-title {
        font-size: 2.25rem;
    }

    .modal-body,
    .rent-modal-body,
    .checkout-body {
        padding: 2rem;
    }

    .checkout-body {
        padding: 1.1rem 1.6rem;
    }

    .modal-foot,
    .rent-modal-foot,
    .checkout-foot {
        padding: 1.8rem 2rem 2rem;
    }

    .checkout-foot {
        padding: 1.1rem 1.6rem 1.4rem;
    }

    .rent-modal-foot {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .rent-form-row,
    .checkout-fields,
    .co-dates {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .rental-dates-row,
    .co-dates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .rental-dates-row input[type="date"],
    .co-dates input[type="date"] {
        -webkit-appearance: none;
        appearance: none;
        min-width: 0;
        padding-inline: 0.55rem;
        font-size: 1.18rem;
        letter-spacing: -0.03em;
        box-sizing: border-box;
    }

    .rental-dates-row input[type="date"]::-webkit-calendar-picker-indicator,
    .co-dates input[type="date"]::-webkit-calendar-picker-indicator {
        margin: 0;
        padding: 0;
        width: 1.5rem;
    }

    .form-field,
    .co-field,
    .modal-input,
    .co-input {
        min-width: 0;
    }

    .co-item {
        grid-template-columns: 1fr;
    }

    .co-item__side {
        align-items: flex-start;
        flex-direction: row;
        justify-content: space-between;
    }

    .modal-links {

        gap: 1rem;
        align-items: flex-start;
    }

    .modal-links__center,
    .modal-links__right {
        margin: 0;
        text-align: left;
    }

    .btn,
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .modal-input,
    .co-input {
        height: 4.8rem;
        border-radius: 1.2rem;
        font-size: 1.45rem;
    }

    .checkout-box .co-input {
        height: 4.1rem;
    }

    .checkout-block {
        padding: 1rem 0;
    }

    .checkout-add-btn,
    .checkout-submit {
        min-height: 4.1rem;
        height: 4.1rem;
    }

    .checkout-total-val {
        font-size: 2rem;
    }
}
