/* Room Gallery Styles */
#hbm-gallery-container {
    padding: 10px 0;
}

.hbm-gallery-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    min-height: 50px;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background: #fafafa;
}

.hbm-gallery-images:empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hbm-gallery-images:empty:before {
    content: 'No images added yet. Click "Add Images" to get started.';
    color: #999;
    font-style: italic;
}

.hbm-gallery-image {
    position: relative;
    width: 100px;
    height: 100px;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: move;
    background: #fff;
    transition: all 0.2s ease;
}

.hbm-gallery-image:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hbm-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hbm-remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hbm-gallery-image:hover .hbm-remove-image {
    opacity: 1;
}

.hbm-remove-image:hover {
    background: rgba(185, 28, 28, 1);
    transform: scale(1.1);
}

.hbm-gallery-placeholder {
    width: 100px;
    height: 100px;
    border: 2px dashed #0073aa;
    border-radius: 4px;
    background: rgba(0, 115, 170, 0.1);
}

/* Meta Box Improvements */
.form-table th {
    width: 200px;
    padding: 15px 10px 15px 0;
}

.form-table td {
    padding: 15px 10px;
}

.form-table input[type="number"].small-text {
    width: 80px;
}

.form-table input[type="number"].regular-text,
.form-table input[type="text"].regular-text,
.form-table select.regular-text {
    width: 100%;
    max-width: 400px;
}

.form-table .description {
    margin-top: 5px;
    font-style: italic;
    color: #666;
}

/* Room Admin Columns */
.column-thumbnail {
    width: 80px;
}

.column-room_type,
.column-units {
    width: 120px;
}

.column-price,
.column-capacity {
    width: 150px;
}

.column-bookings {
    width: 100px;
}

/* Featured Image Box Enhancement */
#postimagediv .inside {
    margin: 0;
    padding: 0;
}

#postimagediv .inside img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .hbm-gallery-image {
        width: 80px;
        height: 80px;
    }

    .hbm-gallery-placeholder {
        width: 80px;
        height: 80px;
    }

    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
        padding: 10px;
    }

    .form-table input[type="number"].regular-text,
    .form-table input[type="text"].regular-text,
    .form-table select.regular-text {
        max-width: 100%;
    }
}

/* Helper Classes */
.hbm-required {
    color: #dc2626;
}

.hbm-success {
    color: #16a34a;
}

.hbm-info {
    color: #0073aa;
}

/* Loading State */
.hbm-loading {
    opacity: 0.5;
    pointer-events: none;
}

.hbm-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}