/* عنوان جدول */
.nikoo-table-title-text {
    color: #1e57e8;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin: 20px 0 14px;
}

@media (max-width: 600px) {
    .nikoo-table-title-text {
        font-size: 16px;
        margin: 14px 0 10px;
    }
}

/* Wrapper جدول */
.nikoo-table-wrap {
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 26px;
    overflow-x: auto;
}

/* جدول اصلی */
.nikoo-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 360px;
}

.nikoo-table thead tr {
    background: #1e57e8;
    color: #ffffff;
}

.nikoo-table th,
.nikoo-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: center;
    font-size: 15px;
}

@media (max-width: 600px) {
    .nikoo-table th,
    .nikoo-table td {
        padding: 6px;
        font-size: 11.5px;
        line-height: 1.35;
    }
}

/* زیبرا */
.nikoo-table tbody tr:nth-child(even) td {
    background: #fff9ec;
}

/* سطرهای مخفی */
.nikoo-hidden-row {
    display: none;
}

/* دکمه مشاهده بیشتر */
.nikoo-more {
    padding: 12px;
    text-align: center;
    background: #f3f4f6;
    color: #555;
    cursor: pointer;
    font-size: 14px;
}

.nikoo-more.open {
    background: transparent;
    color: #333;
}

/* وقتی بدون هدر است، thead وجود ندارد */
.nikoo-table.nikoo-no-header thead { display: none; }

/* =======================================================================
   Action button inside cells
   Brand colors:
   - Primary: #1d4ed8
   - Secondary: #f4b400
======================================================================= */
.nikoo-action-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:10px 14px;
    border-radius:999px;
    font-weight:800;
    font-size:14px;
    line-height:1.15;
    text-decoration:none !important;
    white-space:nowrap;
    max-width:100%;
    box-sizing:border-box;
}

.nikoo-action-primary{ background:#1d4ed8; color:#fff; }
.nikoo-action-secondary{ background:#f4b400; color:#111827; }

.nikoo-action-btn:hover{ filter:brightness(0.95); }
.nikoo-action-btn:active{ transform:translateY(1px); }

/* ✅ Prevent theme/global link hover from overriding colors */
.nikoo-action-btn,
.nikoo-action-btn:visited,
.nikoo-action-btn:focus,
.nikoo-action-btn:hover{
    text-decoration:none !important;
}
.nikoo-action-primary:visited,
.nikoo-action-primary:focus,
.nikoo-action-primary:hover{ color:#fff !important; }
.nikoo-action-secondary:visited,
.nikoo-action-secondary:focus,
.nikoo-action-secondary:hover{ color:#111827 !important; }

@media (max-width: 600px) {
    /* Mobile: smaller buttons + keep label on ONE line (ellipsis if too long) */
    .nikoo-action-btn{
        padding:6px 10px;
        font-size:11.5px;
        gap:4px;
        min-height:30px;

        /* ✅ keep single-line label */
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
        max-width:100%;
    }

    /* keep within cell without forcing full width */
    .nikoo-table td .nikoo-action-btn,
    .nikoo-table th .nikoo-action-btn{
        width:auto;
        max-width:100%;
    }

    /* reduce horizontal scrolling pressure */
    .nikoo-table{ min-width:320px; }

    /* slightly smaller “more” control on mobile */
    .nikoo-more{ padding:10px; font-size:13px; }
}
