/* ========================================
   MESSAGEHUB OSM
   PHONEBOOK - WHATSAPP
======================================== */


/* ========================================
   PAGE DESCRIPTION
======================================== */

.page-description {

    margin-top: 6px;

    color: var(--text-secondary);

    font-size: 15px;

    line-height: 1.6;
}


/* ========================================
   PHONEBOOK DEVICE CARD
======================================== */

.phonebook-device-card {

    width: 100%;

    margin-bottom: 28px;

    padding: 24px 28px;

    box-sizing: border-box;

    background: var(--bg-card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.12);
}


/* ========================================
   SECTION TITLE
======================================== */

.phonebook-device-card .section-title {

    margin-bottom: 8px;
}


/* ========================================
   DEVICE SELECTOR
======================================== */

.device-selector {

    margin-top: 24px;

    display: flex;

    flex-direction: column;

    gap: 8px;
}


.device-selector label {

    color: var(--text-primary);

    font-size: 14px;

    font-weight: 500;
}


.device-selector select {

    width: 100%;

    height: 44px;

    padding: 0 14px;

    box-sizing: border-box;

    background: #07182F;

    color: var(--text-primary);

    border: 1px solid rgba(155, 179, 212, 0.18);

    border-radius: 9px;

    outline: none;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.device-selector select:hover {

    border-color: var(--border-glow);
}


.device-selector select:focus {

    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(30, 94, 255, 0.10);
}


/* ========================================
   PHONEBOOK TABLE CARD
======================================== */

.phonebook-table-card {

    width: 100%;

    box-sizing: border-box;

    background: var(--bg-card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    overflow: hidden;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.12);
}


/* ========================================
   TABLE TOOLBAR
======================================== */

.table-toolbar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

    padding: 18px 22px;

    border-bottom: 1px solid rgba(155, 179, 212, 0.08);
}


.table-toolbar input {

    width: 100%;

    max-width: 360px;

    height: 42px;

    padding: 0 13px;

    box-sizing: border-box;

    background: #07182F;

    color: var(--text-primary);

    border: 1px solid rgba(155, 179, 212, 0.16);

    border-radius: 9px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.table-toolbar input::placeholder {

    color: var(--text-muted);
}


.table-toolbar input:focus {

    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(30, 94, 255, 0.10);
}


/* ========================================
   REFRESH BUTTON
======================================== */

.refresh-button {

    min-height: 42px;

    padding: 0 18px;

    border-radius: 9px;

    background: rgba(30, 94, 255, 0.08);

    color: var(--text-secondary);

    border: 1px solid var(--border);

    cursor: pointer;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}


.refresh-button:hover {

    background: rgba(30, 94, 255, 0.14);

    border-color: var(--border-glow);

    color: var(--text-primary);
}


/* ========================================
   GROUP TABLE
======================================== */

.phonebook-table-card .table-wrapper {

    border: none;

    border-radius: 0;

    overflow-x: auto;
}


.phonebook-table-card table {

    width: 100%;

    border-collapse: collapse;

    min-width: 650px;
}


.phonebook-table-card th {

    padding: 15px 22px;

    text-align: left;

    background: rgba(30, 94, 255, 0.05);

    color: var(--text-secondary);

    font-size: 13px;

    font-weight: 600;

    border-bottom: 1px solid rgba(155, 179, 212, 0.08);
}


.phonebook-table-card td {

    padding: 16px 22px;

    color: var(--text-primary);

    font-size: 14px;

    border-bottom: 1px solid rgba(155, 179, 212, 0.06);
}


.phonebook-table-card tbody tr {

    transition:
        background 0.2s ease;
}


.phonebook-table-card tbody tr:hover {

    background: rgba(30, 94, 255, 0.05);
}


.phonebook-table-card tbody tr:last-child td {

    border-bottom: none;
}


/* ========================================
   GROUP ICON
======================================== */

.group-icon {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 30px;

    height: 30px;

    margin-right: 10px;

    border-radius: 8px;

    background: rgba(30, 94, 255, 0.12);

    border: 1px solid rgba(30, 94, 255, 0.25);

    color: #72B5FF;

    vertical-align: middle;
}


/* ========================================
   GROUP ID
======================================== */

.phonebook-table-card td:last-child {

    color: var(--text-secondary);

    font-family: monospace;

    font-size: 13px;
}


/* ========================================
   TABLE FOOTER
======================================== */

.table-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    min-height: 50px;

    padding: 0 22px;

    border-top: 1px solid rgba(155, 179, 212, 0.08);

    color: var(--text-secondary);

    font-size: 13px;
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 700px) {

    .phonebook-device-card {

        padding: 20px;
    }


    .table-toolbar {

        align-items: stretch;

        flex-direction: column;
    }


    .table-toolbar input {

        max-width: none;
    }


    .refresh-button {

        width: 100%;
    }


    .phonebook-table-card th,
    .phonebook-table-card td {

        padding: 14px 16px;
    }


    .table-footer {

        padding: 0 16px;
    }

}