/**
 * Question Paper Manager — Frontend Styles
 *
 * All selectors are prefixed with .qpm- to avoid conflicts with
 * themes or other plugins.
 */

/* ── Section wrapper ─────────────────────────────────────────────── */
.qpm-section {
    margin-bottom: 36px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* ── Optional section header (uncomment in shortcode.php if needed) ─ */
.qpm-section-header {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    padding: 13px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qpm-section-title {
    font-size: 15px;
    font-weight: 700;
}

.qpm-count {
    background: rgba(255, 255, 255, 0.22);
    padding: 2px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Table ───────────────────────────────────────────────────────── */
.qpm-table-wrap {
    overflow-x: auto;
}

.qpm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.qpm-table thead th {
    background: #2c3e50;
    color: #fff;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.qpm-th-num    { width: 48px;  text-align: center; }
.qpm-th-date   { width: 130px; }
.qpm-th-action { width: 180px; text-align: center; }

/* ── Rows ────────────────────────────────────────────────────────── */
.qpm-row-even td { background: #fff; }
.qpm-row-odd  td { background: #f7f8fa; }

.qpm-table tbody tr:hover td {
    background: #eaf4fb !important;
}

.qpm-table tbody td {
    border-bottom: 1px solid #edf0f3;
}

.qpm-td-num {
    padding: 10px 14px;
    font-size: 13px;
    color: #aaa;
    text-align: center;
    vertical-align: middle;
}

.qpm-td-name {
    padding: 10px 14px;
    font-size: 14px;
    color: #2c3e50;
    vertical-align: middle;
    line-height: 1.55;
}

.qpm-td-date {
    padding: 10px 14px;
    font-size: 13px;
    color: #777;
    vertical-align: middle;
    white-space: nowrap;
}

.qpm-td-action {
    padding: 6px 10px;
    text-align: center;
    vertical-align: middle;
    min-width: 160px;
}

/* ── Badges & Buttons ────────────────────────────────────────────── */
.qpm-badge-new {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 7px;
    vertical-align: middle;
    letter-spacing: 0.6px;
}

.qpm-btn {
    display: inline-block;
    background: #27ae60;
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.qpm-btn:hover {
    background: #1e8449;
}

.qpm-no-link {
    font-size: 12px;
    color: #bbb;
    font-style: italic;
}

/* ── No papers fallback ──────────────────────────────────────────── */
.qpm-no-papers {
    text-align: center;
    color: #888;
    padding: 2rem;
}

/* ── Pagination ──────────────────────────────────────────────────── */
.qpm-pagination {
    background: #f7f8fa;
    padding: 12px 16px;
    border-top: 1px solid #edf0f3;
}

.qpm-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.qpm-page-btn {
    display: inline-block;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #d0d5dd;
    background: #fff;
    color: #344054;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    line-height: 34px;
    text-align: center;
    transition: all 0.15s ease;
}

.qpm-page-btn:hover {
    background: #eaf4fb;
    border-color: #2271b1;
    color: #2271b1 !important;
}

.qpm-page-active {
    background: #0e7490!important;
    border-color: #0e7490!important;
    color: #fff !important;
}

.qpm-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.qpm-dots {
    font-size: 14px;
    color: #aaa;
    padding: 0 4px;
    line-height: 34px;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .qpm-th-date,
    .qpm-td-date   { display: none; }
    .qpm-td-name   { font-size: 13px; }
    .qpm-btn       { padding: 5px 10px; font-size: 12px; }
    .qpm-page-btn  { min-width: 30px; height: 30px; font-size: 12px; line-height: 30px; }
}

/* ── Clickable Rows ──────────────────────────────────────────────── */
.qpm-row-clickable {
    cursor: pointer;
    transition: background 0.15s ease;
}

.qpm-row-clickable:hover td {
    background: #dbeeff !important;
}

.qpm-row-clickable:focus {
    outline: 2px solid #2271b1;
    outline-offset: -2px;
}

/* ── Title Link (row ke andar) ───────────────────────────────────── */
.qpm-title-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.qpm-title-link:hover {
    color: #2271b1;
    text-decoration: underline;
}

/* ── View Button ─────────────────────────────────────────────────── */
.qpm-btn-view {
    background: #2271b1;
    margin-right: 6px;
}

.qpm-btn-view:hover {
    background: #135e96;
}

/* ── Action column – multiple buttons ke liye spacing ────────────── */
.qpm-td-action {
    white-space: normal;
}

.qpm-td-action .qpm-btn {
    margin: 3px 2px;
    white-space: nowrap;
}
