/* ============================================
   ROOM MANAGEMENT - RESPONSIVE CSS
   Pattern: Matches dog-list responsive behavior
   Updated: November 2025
   ============================================ */

#modal-window-15 .modal-window__content {
    overflow-y: auto;
}

/* ============================================
   CONTAINER & BASE STYLES
   ============================================ */
.dha-room-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.dha-room-container h2 {
    margin: 0;
    font-size: 18px;
}

.dha-room-table {
    width: 100%;
}

/* ============================================
   DESKTOP LAYOUT (Base - No Media Query)
   ============================================ */
.dha-room-row {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    align-items: start;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.dha-room-content {
    display: grid;
    grid-template-columns: 56px max-content;
    gap: 16px;
    align-items: start;
}

/* Photo/Placeholder Styles */
.dha-col-pic {
    width: 56px;
    height: 56px;
}

.dha-room-photo {
    width: 56px !important;
    height: 56px !important;
    border-radius: 6px;
    object-fit: cover;
    margin-bottom: 0 !important;
}

.dha-room-placeholder {
    width: 56px;
    height: 56px;
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dha-room-placeholder .dashicons {
    color: #999;
    font-size: 24px;
}

/* Info Section */
.dha-col-info {
    flex: 1;
}

.dha-room-name {
    font-size: 20px;
    font-weight: 600;
    color: #2c3338;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dha-room-details {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
}

.dha-room-details small {
    display: block;
    margin-top: 4px;
    color: #999;
}

/* Status Indicator */
.dha-status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 8px;
}

.dha-status-indicator.active {
    background-color: #4CAF50;
}

.dha-status-indicator.inactive {
    background-color: #f44336;
}

.dha-status-indicator.maintenance {
    background-color: #ff9800;
}

/* Action Buttons - Desktop */
.dha-col-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.dha-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    color: white;
}

.dha-btn:hover {
    opacity: 0.9;
}

.dha-btn .dashicons {
    color: white;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Button Colors */
.dha-edit-btn {
    background-color: #3090ff;
}

.dha-units-btn {
    background-color: #ff6b3d;
}

.dha-contact-btn {
    background-color: #ffce59;
}

.dha-deactivate-btn {
    background-color: #d63638;
}

.dha-activate-btn {
    background-color: #7ac143;
}

/* List Header */
.dha-list-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.dha-list-header h2 {
    flex: 0 0 auto;
}

.dha-search-container {
    flex: 1;
    position: relative;
}

.dha-add-btn {
    flex: 0 0 auto;
}

/* ============================================
   TABLET LAYOUT (769px - 1024px)
   ============================================ */
@media (max-width: 1024px) and (min-width: 769px) {
    .dha-room-row {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        border: 1px solid #eee;
        border-radius: 8px;
        margin-bottom: 16px;
    }

    .dha-room-content {
        display: grid;
        grid-template-columns: 80px 1fr;
        gap: 16px;
        align-items: start;
    }

    .dha-col-pic {
        flex: 0 0 80px;
        width: 80px;
        height: 80px;
    }

    .dha-room-photo {
        width: 80px !important;
        height: 80px !important;
    }

    .dha-room-placeholder {
        width: 80px;
        height: 80px;
    }

    .dha-col-info {
        flex: 1;
    }

    .dha-col-actions {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
    }

    .dha-btn {
        min-width: 120px;
        height: 44px;
        padding: 0 16px;
        border-radius: 6px;
        font-size: 14px;
    }

    .dha-btn::after {
        display: inline;
        color: white;
        font-size: 14px;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    }

    .dha-btn .dashicons {
        margin-right: 8px;
    }

    .dha-add-btn .dashicons {
        margin-right: 0;
    }

    .dha-edit-btn::after {
        content: "Edit";
    }

    .dha-contact-btn::after {
        content: "Details";
    }

    .dha-deactivate-btn::after {
        content: "Deactivate";
    }

    .dha-activate-btn::after {
        content: "Activate";
    }
}

/* ============================================
   MOBILE LAYOUT (<=768px)
   ============================================ */
@media (max-width: 768px) {
    .dha-room-table {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .dha-list-header {
        display: flex;
        gap: 12px;
    }

    .dha-room-row {
        display: flex;
        flex-direction: column;
        padding: 16px;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: none;
    }

    .dha-room-content {
        display: grid;
        grid-template-columns: 56px auto;
        gap: 16px;
        align-items: start;
    }

    .dha-room-photo,
    .dha-room-placeholder {
        width: 56px;
        height: 56px;
        border-radius: 8px;
        margin: 0;
    }

    .dha-col-info {
        margin: 0;
    }

    .dha-room-name {
        font-size: 22px;
        font-weight: 600;
        margin-bottom: 4px;
    }

    .dha-room-details {
        color: #666;
        font-size: 14px;
    }

    /* CRITICAL: 2-Column Grid for Action Buttons */
    .dha-room-table .dha-col-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-top: 20px;
        width: 100%;
    }

    .dha-btn {
        flex: 1;
        width: auto;
        height: 36px;
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        color: white;
        border-radius: 4px;
    }

    .dha-btn::after {
        display: inline;
    }

    .dha-edit-btn::after {
        content: "Edit";
    }

    .dha-contact-btn::after {
        content: "Details";
    }

    .dha-deactivate-btn::after {
        content: "Deactivate";
    }

    .dha-activate-btn::after {
        content: "Activate";
    }

    .dha-btn .dashicons {
        font-size: 16px;
        color: white;
    }

    .dha-add-btn {
        height: 36px !important;
    }
}

/* ============================================
   EXTRA SMALL MOBILE (<=480px)
   ============================================ */
@media (max-width: 480px) {
    .dha-add-btn {
        width: 100% !important;
        height: 36px !important;
        min-height: 36px !important;
    }

    .dha-list-header {
        flex-direction: column;
    }
}

/* ============================================
   LOADING & EMPTY STATES
   ============================================ */
.dha-loading-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.dha-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

/* ============================================
   PAGINATION STYLES
   ============================================ */
.dha-pagination {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.dha-pagination-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dha-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dha-page-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.dha-page-btn.active {
    background: #3090ff;
    color: white;
    border-color: #3090ff;
}

.dha-pagination-dots {
    padding: 0 8px;
    color: #999;
}

.dha-pagination-info {
    text-align: center;
    color: #666;
    font-size: 14px;
}

@media (max-width: 768px) {
    .dha-pagination-controls {
        flex-wrap: wrap;
    }

    .dha-page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* ============================================
   SEARCH & FILTER STYLES
   ============================================ */
.dha-search-input {
    width: 100%;
    padding: 8px 40px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.dha-clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 4px;
}

.dha-filter-container {
    margin-bottom: 20px;
}

.dha-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* ============================================
   MESSAGE STYLES
   ============================================ */
.dha-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.dha-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dha-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   LOADING INDICATOR
   ============================================ */
.dha-loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.dha-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3090ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   ROOM DETAILS MODAL STYLES
   ============================================ */

/* Room Name Header */
.room-name-header span {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    color: #2c3338;
}

/* Room Details Row Layout */
.room-details-row {
    display: flex;
    gap: 16px;
    padding-bottom: 1.2em;
}

.room-field {
    flex: 1;
    min-width: 0;
}

.room-field-full {
    flex: 1 1 100%;
}

/* Field Labels */
.room-field-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 400;
}

/* Field Values */
.room-field>div span {
    font-size: 1rem;
    color: #2c3338;
    line-height: 1.5;
}


/* Image Gallery */
.room-image-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 8px;
    /* margin-bottom: 20px; */
}

.room-image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.no-images-msg {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 8px 0 0 0;
}

/* Amenities List */
.amenities-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.amenity-item {
    padding: 4px 10px;
    background: #f8f9fa;
    border-left: 3px solid #3090ff;
    margin-bottom: 6px;
    border-radius: 4px;
    list-style-type: none;
}

.no-amenities {
    color: #999;
    font-style: italic;
    padding: 4px 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Mobile: 1-column image gallery */
@media (max-width: 768px) {
    .room-details-row {
        flex-direction: column;
        gap: 8px;
    }

    .room-image-gallery {
        grid-template-columns: 1fr;
    }
}