/**
 * Mohar Booking
 * Room Card
 *
 * Styles for individual available-room cards.
 */


/* ==========================================================================
   Room Card
   ========================================================================== */

.mohar-room-card {
    display: grid;

    margin-bottom: 1.5rem;

    grid-template-columns: minmax(260px, 34%) minmax(0, 1fr) auto;

    position: relative;

    overflow: hidden;

    background: #fff;

    border: 1px solid rgba(38, 67, 52, 0.14);
    border-radius: 14px;

    box-shadow: 0 8px 30px rgba(28, 48, 38, 0.06);

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}


/* ==========================================================================
   Hover State
   ========================================================================== */

.mohar-room-card:hover {
    border-color: rgba(38, 67, 52, 0.28);

    box-shadow: 0 14px 40px rgba(28, 48, 38, 0.10);

    transform: translateY(-2px);
}


/* ==========================================================================
   Selected State
   ========================================================================== */

.mohar-room-card.is-selected {
    border-color: #264334;

    box-shadow: 0 14px 40px rgba(38, 67, 52, 0.14);
}


/* ==========================================================================
   Room Image
   ========================================================================== */

.mohar-room-card__media {
    position: relative;

    min-height: 270px;

    overflow: hidden;

    background: #e9e5dc;
}


.mohar-room-card__image {
    display: block;

    width: 100%;
    height: 100%;

    min-height: 270px;

    object-fit: cover;

    transition: transform 0.5s ease;
}


.mohar-room-card:hover .mohar-room-card__image {
    transform: scale(1.025);
}


/* ==========================================================================
   Image Placeholder
   ========================================================================== */

.mohar-room-card__image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 270px;

    background:
        linear-gradient(
            135deg,
            #e8e3d9 0%,
            #dcd6c9 100%
        );
}


/* ==========================================================================
   Room Number Badge
   ========================================================================== */

.mohar-room-card__number {
    position: absolute;

    top: 18px;
    left: 18px;

    display: inline-flex;
    align-items: center;

    min-height: 30px;

    padding: 6px 11px;

    background: rgba(255, 255, 255, 0.94);

    border: 1px solid rgba(38, 67, 52, 0.10);
    border-radius: 999px;

    color: #264334;

    font-family: inherit;
    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}


/* ==========================================================================
   Room Body
   ========================================================================== */

.mohar-room-card__body {
    display: flex;
    flex-direction: column;

    min-width: 0;

    padding: 34px 34px 30px;
}


/* ==========================================================================
   Eyebrow
   ========================================================================== */

.mohar-room-card__eyebrow {
    margin-bottom: 8px;

    color: #7b776d;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
}


/* ==========================================================================
   Room Title
   ========================================================================== */

.mohar-room-card__title {
    margin: 0;

    color: #264334;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(25px, 2.1vw, 34px);
    font-weight: 400;

    letter-spacing: -0.02em;
    line-height: 1.1;
}


/* ==========================================================================
   Capacity
   ========================================================================== */

.mohar-room-card__capacity {
    display: flex;
    align-items: baseline;
    gap: 8px;

    margin-top: 17px;
}


.mohar-room-card__capacity-label {
    color: #8a857a;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}


.mohar-room-card__capacity-value {
    color: #4b5149;

    font-size: 13px;
}


/* ==========================================================================
   Description
   ========================================================================== */

.mohar-room-card__description {
    max-width: 560px;

    margin: 20px 0 0;

    color: #686960;

    font-size: 14px;
    line-height: 1.75;
}


/* ==========================================================================
   View Details
   ========================================================================== */

.mohar-room-card__details {
    align-self: flex-start;

    margin-top: auto;
    padding: 20px 0 0;

    background: transparent;

    border: 0;

    color: #264334;

    cursor: pointer;

    font-family: inherit;
    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.10em;
    line-height: 1.4;
    text-transform: uppercase;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}


.mohar-room-card__details:hover {
    color: #162b21;
}


.mohar-room-card__details:focus-visible {
    outline: 2px solid #264334;
    outline-offset: 5px;
}


/* ==========================================================================
   Action Area
   ========================================================================== */

.mohar-room-card__action {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-width: 180px;

    padding: 30px 28px;

    background: #f7f5ef;

    border-left: 1px solid rgba(38, 67, 52, 0.10);
}


/* ==========================================================================
   Price
   ========================================================================== */

.mohar-room-card__price {
    display: flex;
    flex-direction: column;
}


.mohar-room-card__price-label {
    color: #898579;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 0.12em;
    line-height: 1.3;
    text-transform: uppercase;
}


.mohar-room-card__price-value {
    margin-top: 5px;

    color: #264334;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    font-weight: 400;

    line-height: 1.1;
}


.mohar-room-card__price-unit {
    margin-top: 4px;

    color: #898579;

    font-size: 11px;

    line-height: 1.4;
}


/* ==========================================================================
   Selection
   ========================================================================== */

.mohar-room-card__select {
    position: relative;

    display: flex;
    align-items: center;
    gap: 11px;

    margin-top: 30px;

    cursor: pointer;
}


.mohar-room-card__select input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}


/* ==========================================================================
   Custom Checkbox
   ========================================================================== */

.mohar-room-card__check {
    position: relative;

    flex: 0 0 22px;

    width: 22px;
    height: 22px;

    background: #fff;

    border: 1px solid rgba(38, 67, 52, 0.38);
    border-radius: 50%;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.mohar-room-card__check::after {
    content: "";

    position: absolute;

    top: 5px;
    left: 7px;

    width: 5px;
    height: 9px;

    border-right: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;

    opacity: 0;

    transform: rotate(45deg) scale(0.7);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


/* ==========================================================================
   Checked State
   ========================================================================== */

.mohar-room-card__select
input:checked
+ .mohar-room-card__check {
    background: #264334;

    border-color: #264334;

    transform: scale(1.03);
}


.mohar-room-card__select
input:checked
+ .mohar-room-card__check::after {
    opacity: 1;

    transform: rotate(45deg) scale(1);
}


/* ==========================================================================
   Keyboard Focus
   ========================================================================== */

.mohar-room-card__select
input:focus-visible
+ .mohar-room-card__check {
    outline: 2px solid #264334;
    outline-offset: 3px;
}


/* ==========================================================================
   Selection Text
   ========================================================================== */

.mohar-room-card__select-text {
    display: flex;
    flex-direction: column;

    min-width: 0;
}


.mohar-room-card__select-label,
.mohar-room-card__selected-label {
    color: #264334;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}


.mohar-room-card__selected-label {
    display: none;
}


/* ==========================================================================
   Selected Text State
   ========================================================================== */

.mohar-room-card.is-selected
.mohar-room-card__select-label {
    display: none;
}


.mohar-room-card.is-selected
.mohar-room-card__selected-label {
    display: inline;
}


/* ==========================================================================
   Responsive — Tablet
   ========================================================================== */

@media (max-width: 900px) {

    .mohar-room-card {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .mohar-room-card__action {
        grid-column: 1 / -1;

        flex-direction: row;
        align-items: center;

        min-width: 0;

        padding: 22px 28px;

        border-top: 1px solid rgba(38, 67, 52, 0.10);
        border-left: 0;
    }

    .mohar-room-card__select {
        margin-top: 0;
    }

}


/* ==========================================================================
   Responsive — Mobile
   ========================================================================== */

@media (max-width: 640px) {

    .mohar-room-card {
        display: flex;
        flex-direction: column;

        border-radius: 12px;
    }

    .mohar-room-card__media {
        min-height: 230px;
    }

    .mohar-room-card__image,
    .mohar-room-card__image-placeholder {
        min-height: 230px;
    }

    .mohar-room-card__body {
        padding: 26px 22px 24px;
    }

    .mohar-room-card__title {
        font-size: 27px;
    }

    .mohar-room-card__description {
        margin-top: 16px;

        font-size: 13px;
        line-height: 1.7;
    }

    .mohar-room-card__action {
        align-items: stretch;

        padding: 22px;

        gap: 22px;
    }

    .mohar-room-card__price {
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
    }

    .mohar-room-card__price-value {
        margin-top: 0;
    }

    .mohar-room-card__price-unit {
        margin-top: 0;
    }

    .mohar-room-card__select {
        margin-top: 0;
    }

}


/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .mohar-room-card,
    .mohar-room-card__image,
    .mohar-room-card__check,
    .mohar-room-card__check::after {
        transition: none;
    }

}