/* ============================================
   PHYSICAL ROOM MANAGEMENT
   Append to: room-management.css
   Updated: April 2026
   ============================================ */

/* Modal scroll */
#modal-window-17 .modal-window__content {
    overflow-y: auto;
}

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

.dha-physical-room-header {
    margin-bottom: 24px;
}

.dha-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #3090ff;
    text-decoration: none;
    margin-bottom: 12px;
}

.dha-back-link:hover {
    text-decoration: underline;
    color: #1a6fd4;
}

.dha-back-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #3090ff;
}

.dha-physical-room-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.dha-physical-room-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3338;
}

/* ============================================
   CARD GRID WRAPPER
   ============================================ */
.dha-physical-room-list-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
}

/* Empty / loading states span all columns */
.dha-physical-room-list-content .dha-no-results,
.dha-physical-room-list-content .dha-loading-placeholder {
    grid-column: 1 / -1;
}

/* ============================================
   CARD - BASE (all breakpoints)
   ============================================ */
.dha-physical-room-row {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
    border: 1px solid #ebebeb;
    padding: 16px;
    gap: 12px;
    transition: box-shadow 0.15s;
}

.dha-physical-room-row:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* ============================================
   CARD HEADER: name + status dot
   ============================================ */
.dha-physical-room-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.dha-physical-room-name {
    font-size: 15px;
    font-weight: 700;
    color: #2c3338;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* ============================================
   CARD BODY: notes
   ============================================ */
.dha-physical-room-notes-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #555;
    font-size: 13px;
    flex: 1;
    /* pushes action to bottom of card */
}

.dha-notes-display {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dha-notes-empty {
    color: #bbb;
    font-style: italic;
}

/* Inline edit controls */
.dha-notes-edit {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.dha-notes-input {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    border: 1px solid #3090ff;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    box-shadow: 0 0 0 2px rgba(48, 144, 255, 0.15);
}

.dha-notes-save-btn,
.dha-notes-cancel-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

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

.dha-notes-cancel-btn {
    background-color: #aaa;
}

.dha-notes-save-btn:hover,
.dha-notes-cancel-btn:hover {
    opacity: 0.85;
}

.dha-notes-save-btn .dashicons,
.dha-notes-cancel-btn .dashicons {
    color: #fff;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Pencil icon */
.dha-notes-edit-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    color: #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s;
}

.dha-notes-edit-btn:hover {
    color: #3090ff;
}

.dha-notes-edit-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ============================================
   CARD FOOTER: toggle button
   Full width, icon + label always visible
   ============================================ */
.dha-physical-room-row .dha-col-actions {
    display: flex;
    margin-top: auto;
    /* stick to bottom of card */
}

.dha-physical-room-row .dha-toggle-status-btn {
    width: 100%;
    height: 34px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-weight: 500;
    transition: opacity 0.2s;
    color: #fff;
}

.dha-physical-room-row .dha-toggle-status-btn:hover {
    opacity: 0.88;
}

.dha-physical-room-row .dha-toggle-status-btn .dashicons {
    color: #fff;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Label always visible (not via ::after, inline in button HTML) */
.dha-physical-room-row .dha-deactivate-btn::after {
    content: "Deactivate";
    display: inline;
    font-size: 13px;
    color: #fff;
}

.dha-physical-room-row .dha-activate-btn::after {
    content: "Activate";
    display: inline;
    font-size: 13px;
    color: #fff;
}

/* ============================================
   BATCH CREATE FORM (Modal 18)
   ============================================ */
.dha-batch-summary {
    background: #f0f6ff;
    border: 1px solid #c8deff;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 14px;
    color: #2c3338;
    margin-bottom: 20px;
}

.dha-optional {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

/* ============================================
   ERROR MESSAGE (guard block)
   ============================================ */
.dha-error-msg {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

/* ============================================
   TABLET LAYOUT (769px - 1024px): 2 columns
   ============================================ */
@media (max-width: 1024px) and (min-width: 769px) {

    .dha-physical-room-list-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .dha-physical-room-title-row {
        flex-wrap: wrap;
    }
}

/* ============================================
   MOBILE LAYOUT (<=768px): 1 column
   ============================================ */
@media (max-width: 768px) {

    .dha-physical-room-list-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dha-physical-room-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .dha-physical-room-title {
        font-size: 17px;
    }

    .dha-physical-room-name {
        white-space: normal;
    }

    .dha-notes-display {
        white-space: normal;
    }
}

/* ============================================
   EXTRA SMALL MOBILE (<=480px)
   ============================================ */
@media (max-width: 480px) {

    .dha-physical-room-title-row .dha-add-btn {
        width: 100% !important;
    }
}