/**
 * Room Types Display Styles
 * Matches the Routiz listing design exactly
 */

/* Room Types Module Container - Routiz Style */
.rz-mod-listing.rz-room-types {
    margin-bottom: 2rem;
}

.rz-mod-listing.rz-room-types .rz-mod-content > h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    color: #111;
}

/* Price display in listing card */
.rz-room-types .rz-listing-price-display {
    margin-top: 0.5rem;
}

.rz-room-types .rz-listing-price-display .rz-price-amount {
    font-size: 1rem;
    font-weight: 600;
    color: #d80566;
}

/* Dummy image placeholder - match Routiz style */
.rz-room-types .rz-listing-dummy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    color: #666;
    font-size: 3rem;
}

/* Legacy Room Types Module Container */
.rz-listing-room-types {
    margin-bottom: 2rem;
}

.rz-listing-room-types .rz--heading {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.rz-listing-room-types .rz--icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 50%;
    margin-right: 1rem;
}

.rz-listing-room-types .rz--icon i {
    font-size: 20px;
    color: #6b7280;
}

.rz-listing-room-types .rz--title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

/* Room Types Grid */
.rz-room-types-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.rz-room-types-grid .rz-listing-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rz-room-types-grid .rz-listing {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.rz-room-types-grid .rz-listing:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Cover/Image */
.rz-room-types-grid .rz-listing-cover {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.rz-room-types-grid .rz-listing-gallery {
    display: block;
    width: 100%;
    height: 100%;
}

.rz-room-types-grid .rz-gallery-item {
    width: 100%;
    height: 100%;
}

.rz-room-types-grid .rz-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rz-room-types-grid .rz-listing:hover .rz-gallery-item img {
    transform: scale(1.05);
}

.rz-room-types-grid .rz-gallery-item.rz-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 3rem;
}

/* Price Badge */
.rz-room-types-grid .rz-listing-price {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.rz-room-types-grid .rz-listing-price .rz-price {
    font-weight: 700;
    font-size: 1.1rem;
}

.rz-room-types-grid .rz-listing-price .rz-price-unit {
    opacity: 0.8;
    font-size: 0.85rem;
}

/* Content */
.rz-room-types-grid .rz-listing-content {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
}

.rz-room-types-grid .rz-listing-heading {
    margin-bottom: 0.5rem;
}

.rz-room-types-grid .rz-listing-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

.rz-room-types-grid .rz-listing-excerpt {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* Details */
.rz-room-types-grid .rz-listing-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.rz-room-types-grid .rz-detail-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.rz-room-types-grid .rz-detail-item i {
    color: #9ca3af;
}

/* Amenities */
.rz-room-types-grid .rz-listing-amenities {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rz-room-types-grid .rz-amenity {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 6px;
    color: #6b7280;
    font-size: 0.9rem;
}

.rz-room-types-grid .rz-amenity-more {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    border-radius: 6px;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 1024px) {
    .rz-room-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .rz-room-types-grid {
        grid-template-columns: 1fr;
    }
}

/* Room Types List (Fallback) */
.rz-room-types-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Individual Room Type Item */
.rz-room-type-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.rz-room-type-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
}

/* Room Type Image */
.rz-room-type-image {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    overflow: hidden;
    border-radius: 6px;
}

.rz-room-type-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.rz-room-type-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rz-room-type-item:hover .rz-room-type-image img {
    transform: scale(1.05);
}

.rz-room-type-image .rz-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 3rem;
}

/* Room Type Content */
.rz-room-type-content {
    flex: 1;
    min-width: 0;
}

.rz-room-type-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.rz-room-type-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.rz-room-type-title a:hover {
    color: #ff5a5f;
}

/* Room Type Details (Icons) */
.rz-room-type-details {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.rz-room-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #6b7280;
}

.rz-room-detail i {
    font-size: 1rem;
    color: #9ca3af;
}

.rz-room-detail span {
    font-weight: 500;
}

/* Room Type Action Button */
.rz-room-type-action {
    flex-shrink: 0;
}

.rz-room-type-action .rz-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.rz-room-type-action .rz-button-accent {
    background: #ff5a5f;
    color: #ffffff;
    border: none;
}

.rz-room-type-action .rz-button-accent:hover {
    background: #e04e53;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(255, 90, 95, 0.3);
}

.rz-room-type-action .rz-button-accent:active {
    transform: translateY(0);
}

/* Rooms Display Styles */
.rz-listing-rooms {
    margin-bottom: 2rem;
}

.rz-listing-rooms .rz--heading {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.rz-listing-rooms .rz--icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 50%;
    margin-right: 1rem;
}

.rz-listing-rooms .rz--icon i {
    font-size: 20px;
    color: #6b7280;
}

.rz-listing-rooms .rz--title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

/* Rooms List */
.rz-rooms-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Individual Room Item */
.rz-room-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.rz-room-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
}

.rz-room-item.rz-booked {
    opacity: 0.7;
}

/* Room Image */
.rz-room-image {
    flex-shrink: 0;
    width: 180px;
    height: 135px;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
}

.rz-room-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.rz-room-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rz-room-item:hover .rz-room-image img {
    transform: scale(1.05);
}

.rz-room-image .rz-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 2.5rem;
}

/* Room Status Badge */
.rz-room-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.rz-status-available {
    background: #10b981;
    color: #ffffff;
}

.rz-status-booked {
    background: #ef4444;
    color: #ffffff;
}

.rz-room-status i {
    font-size: 0.85rem;
}

/* Room Content */
.rz-room-content {
    flex: 1;
    min-width: 0;
}

.rz-room-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.rz-room-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
}

.rz-room-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.rz-room-title a:hover {
    color: #ff5a5f;
}

.rz-room-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff5a5f;
    white-space: nowrap;
}

.rz-price-unit {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
}

/* Room Details (Icons) */
.rz-room-details {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.rz-room-detail {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.rz-room-detail i {
    font-size: 1rem;
    color: #9ca3af;
}

.rz-room-detail span {
    font-weight: 500;
}

/* Room Action Button */
.rz-room-action {
    flex-shrink: 0;
}

.rz-room-action .rz-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.rz-room-action .rz-button-accent {
    background: #ff5a5f;
    color: #ffffff;
    border: none;
}

.rz-room-action .rz-button-accent:hover {
    background: #e04e53;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(255, 90, 95, 0.3);
}

.rz-room-action .rz-button-secondary {
    background: #6b7280;
    color: #ffffff;
    border: none;
}

.rz-room-action .rz-button-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.rz-room-action .rz-button:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .rz-room-type-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .rz-room-type-image {
        width: 100%;
        height: 200px;
    }

    .rz-room-type-action {
        width: 100%;
    }

    .rz-room-type-action .rz-button {
        width: 100%;
    }

    .rz-room-type-details {
        gap: 1rem;
    }

    /* Rooms responsive */
    .rz-room-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .rz-room-image {
        width: 100%;
        height: 180px;
    }

    .rz-room-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .rz-room-action {
        width: 100%;
    }

    .rz-room-action .rz-button {
        width: 100%;
    }

    .rz-room-details {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .rz-listing-room-types .rz--title,
    .rz-listing-rooms .rz--title {
        font-size: 1.25rem;
    }

    .rz-room-type-title {
        font-size: 1.1rem;
    }

    .rz-room-type-image {
        height: 180px;
    }

    .rz-room-title {
        font-size: 1.05rem;
    }

    .rz-room-image {
        height: 160px;
    }

    .rz-room-price {
        font-size: 1.1rem;
    }
}

/* Custom Room Type Card Styles */
.lrtm-room-type-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.lrtm-room-type-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.lrtm-room-type-card .rz-listing-cover {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f3f4f6;
}

.lrtm-room-type-card .rz-listing-cover-inner {
    width: 100%;
    height: 100%;
}

.lrtm-room-type-card .rz-listing-image {
    width: 100%;
    height: 100%;
}

.lrtm-room-type-card .rz-listing-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.lrtm-room-type-card .rz-listing-image .rz-image {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.lrtm-room-type-card:hover .rz-listing-image .rz-image {
    transform: scale(1.05);
}

/* Placeholder image styling - match actual image cards */
.lrtm-room-type-card .rz-listing-dummy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #9ca3af;
    font-size: 2.5rem;
}

.lrtm-room-type-card .rz-listing-dummy i {
    opacity: 0.6;
}

.lrtm-room-type-card .rz-listing-content {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
}

.lrtm-room-type-card .rz--heading {
    margin-bottom: 0.5rem;
}

.lrtm-room-type-card .rz-title h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

.lrtm-room-type-description {
    margin-bottom: 0.75rem;
}

.lrtm-room-type-description p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

.lrtm-room-type-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.lrtm-room-type-details .lrtm-detail {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.lrtm-room-type-details .lrtm-detail i {
    color: #9ca3af;
    font-size: 0.9rem;
}

.lrtm-room-type-details .lrtm-detail-price {
    color: #d80566;
    font-weight: 600;
}

.lrtm-room-type-details .lrtm-detail-price i {
    color: #d80566;
}

.lrtm-room-type-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
}

.lrtm-room-type-amenities .lrtm-amenity-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #4b5563;
}

.lrtm-room-type-amenities .lrtm-amenity-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    background: #e5e7eb;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
}

/* Hide raw JSON data that Routiz might display in listing details */
/* This catches JSON-like content that shouldn't be visible to users */
.rz-listing-details li:empty,
.rz-listing-details-content li:empty,
.rz-listing-bottom li:empty,
.rz--details li:empty {
    display: none !important;
}

/* Hide elements marked as containing JSON by JavaScript */
.lrtm-hidden-json {
    display: none !important;
}

/* WooCommerce Cart & Checkout - Room Hierarchy Display */
.woocommerce-cart-form .cart_item .product-name dl.variation,
.woocommerce-checkout-review-order .cart_item .product-name dl.variation,
.woocommerce table.shop_table dl.variation {
    white-space: pre-line; /* Preserve newlines */
}

.woocommerce-cart-form .cart_item .product-name dl.variation dd,
.woocommerce-checkout-review-order .cart_item .product-name dl.variation dd,
.woocommerce table.shop_table dl.variation dd {
    white-space: pre-line; /* Preserve newlines */
    line-height: 1.6;
}

/* Ensure line breaks in cart item data */
.woocommerce-cart-form .cart_item .product-name .wc-item-meta-li,
.woocommerce-checkout-review-order .cart_item .product-name .wc-item-meta-li {
    white-space: pre-line; /* Preserve newlines */
    line-height: 1.6;
}

/* Better styling for Room hierarchy in cart */
.woocommerce-cart-form .cart_item .product-name dl.variation dd p,
.woocommerce-checkout-review-order .cart_item .product-name dl.variation dd p {
    margin: 0;
    white-space: pre-line;
    line-height: 1.6;
}

/* Make the entire listing value more prominent */
.woocommerce-cart-form .cart_item .product-name dl.variation dd,
.woocommerce-checkout-review-order .cart_item .product-name dl.variation dd,
.woocommerce table.shop_table dl.variation dd,
.wc-block-components-product-details__value {
    font-weight: 600 !important;
    color: #333 !important;
}

.lrtm-hidden-json{
	display: none !important
}

/* ==========================================================================
   Counter Mode - Room Type page
   ========================================================================== */

.lrtm-rooms-counter {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}

.lrtm-rooms-counter-inner {
    margin-bottom: 1.5rem;
}

.lrtm-rooms-counter-inner i {
    font-size: 2rem;
    color: #2271b1;
    margin-bottom: 0.5rem;
    display: block;
}

.lrtm-rooms-count {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #1d2327;
    line-height: 1;
}

.lrtm-rooms-label {
    display: block;
    font-size: 1rem;
    color: #646970;
    margin-top: 0.5rem;
}

.lrtm-book-random-room {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #2271b1;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.lrtm-book-random-room:hover {
    background: #135e96;
    color: #fff;
}

/* ==========================================================================
   No-link Room Cards
   ========================================================================== */

.lrtm-no-room-links .rz-listing-item a {
    pointer-events: none;
    cursor: default;
}

.lrtm-no-room-links .rz-listing-item a:hover {
    opacity: 1;
}

/* ==========================================================================
   Floor Badge (Room Cards & Single Page)
   ========================================================================== */

.lrtm-room-floor-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    margin-bottom: 4px;
}

.lrtm-room-floor-badge i {
    font-size: 11px;
    color: #999;
}

/* Floor badge overlay on Routiz room cards */
.rz-rooms .rz-listing-item .lrtm-floor-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.92);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.rz-rooms .rz-listing-item {
    position: relative;
}

.lrtm-room-floor-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    margin-bottom: 1rem;
}

.lrtm-room-floor-info i {
    color: #0073aa;
}

/* ==========================================================================
   Suite Badges (Account Management)
   ========================================================================== */

.lrtm-suite-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}

.lrtm-suite-primary {
    background: #e8f4fd;
    color: #0073aa;
}

.lrtm-suite-secondary {
    background: #f0f0f0;
    color: #666;
}
