/**
 * Dynamic Contact Table Manager - Frontend Stylesheet
 */

.dctm-container {
    margin: 20px 0;
    width: 100%;
    font-family: inherit;
}

/* Responsive Table Wrapper */
.dynamic-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
}

.dynamic-table-wrapper.responsive-yes {
    display: block;
}

/* Base Dynamic Table */
.dynamic-contact-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    box-sizing: border-box;
}

.dynamic-contact-table th,
.dynamic-contact-table td {
    vertical-align: middle;
    box-sizing: border-box;
}

/* Heading formatting reset */
.dynamic-contact-table th h4,
.dynamic-contact-table td h4,
.dynamic-contact-table th h5,
.dynamic-contact-table td h5 {
    margin: 0;
    padding: 0;
    font-weight: 600;
    line-height: 1.4;
}

.dynamic-contact-table th h4 {
    font-size: 1.05em;
}

.dynamic-contact-table td h4 {
    font-size: 1em;
}

/* Sorting indicators */
.dynamic-contact-table th.dctm-sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px !important;
}

.dynamic-contact-table th.dctm-sortable::after {
    content: '⇅';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 11px;
}

.dynamic-contact-table th.dctm-sort-asc::after {
    content: '▲';
    opacity: 1;
}

.dynamic-contact-table th.dctm-sort-desc::after {
    content: '▼';
    opacity: 1;
}

/* Search Box */
.dctm-search-box {
    margin-bottom: 12px;
    display: flex;
    justify-content: flex-end;
}

.dctm-search-input {
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: border-color 0.15s ease-in-out;
}

.dctm-search-input:focus {
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* Pagination Bar */
.dctm-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 13px;
    color: #475569;
}

.dctm-page-btn {
    background: #007BFF;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s ease-in-out;
}

.dctm-page-btn:hover:not(:disabled) {
    background: #0056b3;
}

.dctm-page-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.dctm-hidden-row {
    display: none !important;
}
