/**
 * Ababil Post Table Widget Styles
 *
 * Structural-only stylesheet. All visual properties (colors, padding,
 * typography, borders) are controlled via Elementor widget controls.
 */

/* ========================================
   Messages (editor-only)
   ======================================== */
.ababil-message {
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.ababil-message-error { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.ababil-message-info { background-color: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ========================================
   Widget Wrapper
   ======================================== */
.ababil-post-table {
    overflow: hidden;
    box-sizing: border-box;
}

/* ========================================
   Toolbar (Search + Per-page Select)
   ======================================== */
.ababil-post-table .ababil-pt-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.ababil-post-table .ababil-pt-search {
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    max-width: 100%;
}

.ababil-post-table .ababil-pt-select {
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    max-width: 100%;
}

/* ========================================
   Table
   ======================================== */
.ababil-post-table .ababil-pt-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ababil-post-table .ababil-pt-table {
    width: 100%;
    border-collapse: collapse;
}

.ababil-post-table .ababil-pt-table th {
    text-align: left;
    border-bottom-style: solid;
}

.ababil-post-table .ababil-pt-table td {
    border-bottom-style: solid;
}

.ababil-post-table .ababil-pt-table tbody tr {
    transition: background-color 0.15s ease;
}

.ababil-post-table .ababil-pt-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   Table Enhancements
   ======================================== */
.ababil-post-table .ababil-pt-table.ababil-pt-sticky thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ========================================
   Combined Values Layout
   ======================================== */
.ababil-post-table .ababil-pt-combined-wrapper {
    display: flex;
    gap: 4px;
}

.ababil-post-table .ababil-pt-display-stack {
    flex-direction: column;
}

.ababil-post-table .ababil-pt-display-inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

/* ========================================
   Featured Image
   ======================================== */
.ababil-post-table .ababil-pt-image-wrapper {
    overflow: hidden;
    display: inline-block;
}

.ababil-post-table .ababil-pt-featured-image {
    display: block;
    transition: transform 0.3s ease;
}

.ababil-post-table .ababil-pt-featured-image:hover {
    transform: scale(1.1);
}

/* ========================================
   Empty State
   ======================================== */
.ababil-post-table .ababil-pt-empty-row td {
    text-align: center;
    padding: 40px !important;
    color: #94a3b8;
    font-style: italic;
}

/* ========================================
   Footer
   ======================================== */
.ababil-post-table .ababil-pt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-style: solid;
    margin-top: 16px;
    padding-top: 16px;
}

/* ========================================
   Pagination
   ======================================== */
.ababil-post-table .ababil-pt-pagination {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.ababil-post-table .ababil-pt-page-btn {
    border-style: solid;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: inherit;
    min-width: 36px;
    line-height: 1;
}

.ababil-post-table .ababil-pt-page-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ababil-post-table .ababil-pt-page-btn.ababil-pt-nav-btn { font-weight: 600; }

/* ========================================
   Search Highlighter
   ======================================== */
.ababil-post-table .ababil-pt-highlight {
    background-color: #fef08a;
    color: #854d0e;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .ababil-post-table .ababil-pt-toolbar { flex-direction: column; align-items: stretch; }
    .ababil-post-table .ababil-pt-footer { flex-direction: column; align-items: stretch; gap: 12px; }
    .ababil-post-table .ababil-pt-pagination { justify-content: center; }
}

@media (max-width: 480px) {
    .ababil-post-table .ababil-pt-search { font-size: 16px; }
}

/* ========================================
   Print
   ======================================== */
@media print {
    .ababil-post-table .ababil-pt-toolbar,
    .ababil-post-table .ababil-pt-footer { display: none; }
    .ababil-post-table { box-shadow: none; }
    .ababil-post-table td, .ababil-post-table th { background: transparent !important; }
}
