/* ======================================== */
/* page-layout.css - Page layout, info-box,*/
/* unlock-box, drag-handle styles          */
/* ======================================== */

/* ======================================== */
/*              Info-Box                    */
/* ======================================== */
.info-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #d7ece6;
    padding: 12px 16px;
    border-radius: 2px;
    color: #2d3e50;
    font-size: var(--font-size);
    margin-bottom: 16px;
}

    .info-box > i:first-child {
        font-size: 1.2em;
        color: var(--primary);
    }

    .info-box .save-status {
        margin-left: auto;
        color: var(--muted-color);
    }

.unlock-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background-color: #fff5e6;
    border-radius: 2px;
    margin-bottom: 16px;
}

.url-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-100);
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 4px;
}

    .url-row code {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.9em;
    }

    .info-box.warning {
        background-color: #fff5e6;
        border-left-color: #ff9800;
    }

    .info-box.success {
        background-color: #eaf7ea;
        border-left-color: #4caf50;
    }

    .info-box.error {
        background-color: #fdecea;
        border-left-color: #f44336;
    }

/* ======================================== */
/*              Drag and Drop               */
/* ======================================== */

.col-order {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
}

.handle-cell {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 0;
    text-align: center;
}

.drag-handle {
    cursor: grab;
    opacity: 0.4;
    padding: 0.25rem;
    background: transparent;
    border: none;
    width:100%;
    transition: opacity 0.15s ease;
}

    .drag-handle:hover {
        opacity: 0.7;
    }

    .drag-handle:active {
        cursor: grabbing;
        opacity: 1;
    }

/* ======================================== */
/*            Page Layout              */
/* ======================================== */

.page-content {
    max-width: 2000px;
    padding: 25px;
    row-gap: 8px;
    display: grid;
}

@media (max-width: 768px) {
    .page-content {
        padding: 15px;
    }
}

@media (max-width: 400px) {
    .page-content {
        padding: 5px;
    }
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    padding: 12px 10px;


    margin-bottom: 5px;
}

    .page-header .tx-search-input {
        flex: 1;
        max-width: 280px;
        min-width: 150px;
    }

    .page-header .btn {
        height: var(--input-min-height);
        padding: 0 12px;
        white-space: nowrap;
        min-width:100px;
    }

.page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

    .page-title i {
        font-size: 20px;
        color: var(--primary);
    }

.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    position: sticky;
    top: -25px;
    margin: -25px -25px 0 -25px;
    padding: 25px 25px 10px 25px;
    background: var(--body-bg);
    z-index: 15;
}

    .page-toolbar .tx-search-input {
        flex: 1;
        max-width: 280px;
        min-width: 150px;
    }

    .page-toolbar .btn {
        height: var(--input-min-height);
        padding: 0 12px;
        white-space: nowrap;
    }

@media (max-width: 768px) {
    .page-toolbar {
        top: -15px;
        margin: -15px -15px 0 -15px;
        padding: 15px 15px 10px 15px;
    }
}

@media (max-width: 400px) {
    .page-toolbar {
        top: -5px;
        margin: -5px -5px 0 -5px;
        padding: 5px 5px 10px 5px;
    }
}

.header-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
}

/* Two-row toolbar (z.B. RoomAndTables, HotelUnits) */
.page-toolbar.two-rows {
    flex-direction: column;
    align-items: stretch;
}

    .page-toolbar.two-rows .toolbar-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .page-toolbar.two-rows .toolbar-row.controls {
        justify-content: flex-start;
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
    }

        .page-toolbar.two-rows .toolbar-row.controls .tx-select {
            margin: 0;
        }

.page-controls {
    display: flex;
    gap: 16px;
    align-items: end;
    padding: 12px 14px;

}

    .page-controls .form-field {
        margin-bottom: 0;
        min-width: 180px;
    }

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

    .settings-form h3 {
        margin: 8px 0 0 0;
        font-size: 14px;
        font-weight: 600;
        color: var(--text-color);
    }

    .settings-form .mandatory-field {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 0;
        border-bottom: 1px solid var(--gray-100);
    }

.notification-type-block {
    padding: 0 16px 10px 0px;
    border-bottom: 1px solid var(--gray-100);
    display: grid;
    gap: 4px;
}

    .notification-type-block:last-child {
        border-bottom: none;
    }

.notification-type-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

    .notification-type-header h3 {
        margin: 0;
        font-size: 15px;
        font-weight: 600;
    }

.page-loading {
    display: flex;
    justify-content: center;
    padding: 60px 0;
}

.page-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: var(--gray-400);
}

    .page-empty i {
        font-size: 48px;
        margin-bottom: 12px;
    }

    .page-empty p {
        margin: 0;
        font-size: 14px;
    }

.page-body {
    padding: 0;
}

/* List Items (card-style) */
.list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
}

    .list-item:last-child {
        border-bottom: none;
    }

@media (hover: hover) {
    .list-item:hover {
        background: var(--gray-100);
    }
}

    .list-item:active {
        background: var(--gray-200);
    }

.list-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.list-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.list-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-subtitle {
    font-size: 12px;
    color: var(--gray-500);
}

.list-item-icon {
    color: var(--gray-400);
    font-size: 18px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header .tx-search-input {
        max-width: none;
    }

    .header-buttons {
        justify-content: flex-start;
    }

    .page-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .page-controls .form-field {
        min-width: auto;
    }
}
