/* Аренда игр: блок на главной, страница «Вся аренда», карточка аренды, аренды в личном кабинете. */

.rent-item, .rent-home, .rent-page, .rent-card, .rent-available, .rent-my {
    font-family: 'SuisseIntl', Roboto, sans-serif;
}

/* ---- Плитка игры ---- */

.rent-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 192px;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--sony-font-color);
}

.rent-item-img {
    position: relative;
    aspect-ratio: 1 / 1.046;
    border-radius: 8px;
    background-color: var(--sony-color-07);
    background-size: cover;
    background-position: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rent-item:hover .rent-item-img {
    transform: scale(1.03);
    box-shadow: var(--site-shadow);
}

.rent-item-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--sony-gradient);
    color: white;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
}

.rent-item-platform {
    position: absolute;
    right: 8px;
    top: 8px;
    padding: 4px 8px;
    border-radius: 20px;
    background: rgba(0, 6, 22, 0.6);
    color: white;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
}

.rent-item-price {
    font-size: 22px;
    line-height: 28px;
    font-weight: 700;
}

.rent-item-name {
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Всегда две строки: статус под названием стоит на одной линии у всех плиток. */
    min-height: 40px;
}

/* ---- Статус «Свободен / Занят до / Выйдет» ---- */

.rent-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 4px 12px 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
}

.rent-status::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 10px;
    flex-shrink: 0;
}

.rent-status-free {
    background: #EAF8E6;
    color: #1F7A12;
}

.rent-status-free::before {
    background: var(--sony-color-04);
}

.rent-status-busy {
    background: #FFF0F0;
    color: var(--sony-color-40);
}

.rent-status-busy::before {
    background: var(--sony-error);
}

.rent-status-soon {
    background: var(--sony-color-15);
    color: var(--sony-accent-color);
}

.rent-status-soon::before {
    background: var(--sony-accent-color);
}

.rent-status-small {
    padding: 2px 10px 2px 8px;
    font-size: 12px;
    line-height: 16px;
}

.rent-status-small::before {
    width: 8px;
    height: 8px;
}

/* ---- Блок на главной ---- */

.rent-home {
    width: 100%;
    padding: 28px 0;
    display: flex;
    justify-content: center;
}

.rent-home-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rent-home-title {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--sony-font-color);
}

.rent-home-title h1 {
    flex-grow: 1;
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    text-transform: uppercase;
}

.rent-home-items {
    display: flex;
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    /* Полосу прокрутки не показываем: ряд листается свайпом, тачпадом или Shift + колесо. */
    scrollbar-width: none;
}

.rent-home-items::-webkit-scrollbar {
    display: none;
}

/* Карусель блока аренды на широком экране: стрелки по краям и полоски-индикаторы. */
.rent-home-carousel, .rent-home-indicator {
    display: none;
}

@media (min-width: 1200px) {
    .rent-home-items {
        display: none;
    }

    .rent-home-carousel {
        display: block;
        position: relative;
    }

    .rent-home-window {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 16px;
    }

    .rent-home-indicator {
        display: flex;
        justify-content: center;
        margin-top: 12px;
    }

    .rent-home-arrow {
        width: 52px;
        height: 52px;
        position: absolute;
        top: 38%;
        transform: translateY(-50%);
        z-index: 20;
        background-color: #E6EFF7;
        border-radius: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .rent-home-arrow.left {
        left: -84px;
    }

    .rent-home-arrow.right {
        right: -84px;
    }
}

@media (max-width: 743px) {
    .rent-home {
        padding: 16px 0;
    }

    .rent-home-inner {
        padding: 0 16px;
        gap: 12px;
    }

    .rent-item {
        width: 148px;
    }

    .rent-item-price {
        font-size: 18px;
        line-height: 24px;
    }

    .rent-item-name {
        font-size: 14px;
        line-height: 18px;
        min-height: 36px;
    }
}

@media (min-width: 1200px) {
    .rent-home-title h1 {
        font-size: 32px;
        line-height: 40px;
    }
}

/* ---- Страница «Вся аренда» ---- */

.rent-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 120px;
}

.rent-page-rule {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 16px;
    background: var(--sony-light-gradient);
    font-size: 15px;
    line-height: 20px;
}

.rent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 28px 20px;
}

.rent-grid .rent-item {
    width: 100%;
}

@media (max-width: 743px) {
    .rent-page {
        padding: 16px 16px 120px;
    }

    .rent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 12px;
    }
}

/* ---- Карточка аренды ---- */

/* Раскладка повторяет обычную карточку игры: обложка — подложка на всю ширину, белая
   карточка лежит на ней слева, характеристики и описание — справа под обложкой. */

.rent-card-back {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 100%;
    height: 620px;
    object-fit: cover;
    z-index: 0;
}

.rent-card-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 174px 20px 140px;
}

.rent-card-area {
    width: 100%;
    max-width: 664px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.rent-card {
    width: 100%;
    max-width: 496px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 28px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--site-shadow);
}

.rent-card-info {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rent-card-info-row {
    display: flex;
    align-items: center;
    font-size: 20px;
    line-height: 28px;
}

.rent-card-info-row span:first-child {
    flex-grow: 1;
    color: var(--sony-secondary-font-color);
}

.rent-card-description {
    font-size: 20px;
    line-height: 28px;
    font-weight: 400;
}

@media (min-width: 1040px) {
    .rent-card-back {
        width: 1120px;
        border-bottom-left-radius: 32px;
        border-bottom-right-radius: 32px;
    }
}

@media (min-width: 1200px) {
    .rent-card-area {
        width: 1040px;
        max-width: none;
        flex-direction: row;
        align-items: flex-start;
        gap: 64px;
    }

    .rent-card {
        width: 496px;
        flex-shrink: 0;
    }

    /* Как в обычной карточке: правая колонка начинается под обложкой. */
    .rent-card-info {
        margin-top: 500px;
    }
}

@media (min-width: 1520px) {
    .rent-card-back {
        width: 1280px;
        border-bottom-left-radius: 40px;
        border-bottom-right-radius: 40px;
    }

    .rent-card-area {
        width: 1200px;
    }
}

.rent-card-name {
    font-size: 28px;
    line-height: 34px;
    font-weight: 700;
    text-transform: uppercase;
}

.rent-card-price {
    font-size: 32px;
    line-height: 38px;
    font-weight: 700;
}

.rent-card-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    padding: 8px 20px;
    border-radius: 28px;
    background: var(--sony-gradient);
    color: white;
    font-size: 20px;
    line-height: 26px;
    font-weight: 600;
    text-align: center;
}

.rent-card-formats {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 20px;
    border: 1px solid var(--sony-color-01);
}

.rent-card-format {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 8px;
    border: none;
    border-radius: 14px;
    background: var(--sony-color-30);
    color: var(--sony-font-color);
    cursor: pointer;
    font-family: inherit;
}

.rent-card-format b {
    font-size: 20px;
    line-height: 24px;
    font-weight: 700;
}

.rent-card-format span {
    font-size: 13px;
    line-height: 18px;
    color: var(--sony-color-36);
}

.rent-card-format.selected {
    background: var(--sony-gradient);
    color: white;
}

.rent-card-format.selected span {
    color: white;
}

/* Выбор срока аренды: 1–4 недели, на длинных сроках — пометка скидки. */
.rent-card-weeks-title {
    font-size: 14px;
    line-height: 18px;
    font-weight: 500;
    color: var(--sony-color-36);
}

/* Счётчик недель: минус, срок, плюс. */
.rent-card-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid var(--sony-color-01);
    background: white;
}

.rent-card-step {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: var(--sony-color-30);
    color: var(--sony-accent-color);
    font-family: inherit;
    font-size: 24px;
    line-height: 1;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color .2s ease, color .2s ease;
}

/* Плюс и минус нарисованы линиями: символы из шрифта стоят не по центру кнопки. */
.rent-card-step {
    position: relative;
    padding: 0;
}

.rent-card-step::before, .rent-card-step.plus::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.rent-card-step.plus::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.rent-card-step:hover:not(:disabled) {
    background: var(--sony-accent-color);
    color: white;
}

.rent-card-step:disabled {
    opacity: .4;
    cursor: default;
}

.rent-card-step-value {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.rent-card-step-value b {
    font-size: 18px;
    line-height: 22px;
    font-weight: 700;
}

.rent-card-step-value span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 16px;
    color: var(--sony-color-36);
}

.rent-card-step-value i {
    font-style: normal;
    font-weight: 600;
    color: var(--sony-green, #39AE27);
}

.rent-card-step-hint {
    font-size: 13px;
    line-height: 16px;
    color: var(--sony-color-36);
    text-align: center;
}

.rent-card-old-price {
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    color: var(--sony-third-font-color);
    text-decoration: line-through;
}

.rent-card-discount {
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--sony-green, #39AE27);
    color: white;
    font-size: 13px;
    line-height: 18px;
    font-weight: 700;
}

.rent-card-selected {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--sony-color-01);
    background: var(--sony-color-06);
}

.rent-card-selected-label {
    font-size: 14px;
    line-height: 18px;
    color: var(--sony-accent-color);
}

.rent-card-selected-title {
    font-size: 20px;
    line-height: 26px;
    font-weight: 500;
}

/* Подсказка «Условия аренды»: открывается при наведении, на телефоне — по нажатию. */

.rent-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    line-height: 20px;
    color: var(--sony-accent-color);
    cursor: pointer;
}

.rent-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 18px;
    border: 1.5px solid var(--sony-accent-color);
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
}

.rent-info-pop {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    z-index: 200;
    width: 360px;
    max-width: calc(100vw - 64px);
    max-height: 320px;
    overflow-y: auto;
    padding: 16px 18px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 12px 36px rgba(0, 21, 71, 0.22);
    color: var(--sony-color-36);
    font-size: 13px;
    line-height: 19px;
    cursor: default;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.rent-info:hover .rent-info-pop,
.rent-info.open .rent-info-pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rent-info-pop p {
    margin: 0 0 10px;
}

.rent-info-pop p:last-child {
    margin-bottom: 0;
}

.rent-info-terms {
    white-space: pre-line;
    padding-top: 10px;
    border-top: 1px solid var(--sony-color-09);
}

.rent-card-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 60px;
    border: none;
    border-radius: 30px;
    background: var(--sony-gradient);
    color: white;
    font-family: inherit;
    font-size: 18px;
    line-height: 24px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.rent-card-button:hover {
    filter: brightness(1.05);
}

.rent-card-button.in-cart {
    background: var(--sony-color-15);
    color: var(--sony-accent-color);
}

.rent-card-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.rent-card-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 16px;
    border: 1px solid var(--sony-color-09);
    font-size: 16px;
    line-height: 22px;
}

.rent-card-row span:first-child {
    flex-grow: 1;
    color: var(--sony-color-36);
}

.rent-card-row b {
    font-weight: 700;
}

.rent-card-link {
    font-size: 15px;
    line-height: 20px;
    color: var(--sony-accent-color);
    text-decoration: none;
    align-self: center;
}

@media (max-width: 743px) {
    .rent-card-back {
        height: 360px;
    }

    .rent-card-wrap {
        padding: 250px 0 140px;
    }

    .rent-card-info {
        padding: 0 16px;
    }

    .rent-card-info-row, .rent-card-description {
        font-size: 16px;
        line-height: 24px;
    }

    .rent-card {
        max-width: none;
        padding: 20px 16px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        gap: 16px;
    }

    .rent-card-name {
        font-size: 24px;
        line-height: 30px;
    }

    .rent-card-pill {
        font-size: 18px;
    }
}

/* ---- «Доступна в аренду» в обычной карточке игры ---- */

.rent-available {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 28px;
    background: var(--sony-gradient);
    color: white;
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
    text-decoration: none;
}

.rent-available:hover {
    filter: brightness(1.05);
}

@media (max-width: 1199px) {
    /* В мобильной карточке блоки идут вплотную — отделяем кнопку от названия. */
    .rent-available {
        margin-bottom: 12px;
    }
}

/* ---- Аренды в личном кабинете ---- */

.rent-my {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rent-my-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: var(--sony-color-06);
    text-decoration: none;
    color: var(--sony-font-color);
}

.rent-my-item img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--sony-color-07);
}

.rent-my-item-name {
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
}

.rent-my-item-info {
    font-size: 13px;
    line-height: 18px;
    color: var(--sony-color-36);
}


/* Телефон: подсказка «Условия аренды» раскрывается на всю ширину блока выбранного формата,
   а не от самой ссылки — иначе она выходила за правый край и страница ездила вбок. */
@media (max-width: 743px) {
    .rent-card-selected {
        position: relative;
    }

    .rent-info {
        position: static;
    }

    .rent-info-pop {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
        box-sizing: border-box;
    }
}
