/**
 * Table Action Button Styles
 * Reusable compact icon/text buttons designed for use inside table rows
 * and modal footers across the Heron School system.
 *
 * Usage:
 *   <button class="tbl-btn tbl-btn-restore" title="Restore">
 *       <i class="fas fa-undo"></i>
 *   </button>
 *   <button class="tbl-btn tbl-btn-delete" title="Delete">
 *       <i class="fas fa-trash"></i>
 *   </button>
 *   <button class="tbl-btn tbl-btn-neutral">
 *       <i class="fas fa-eye"></i> View
 *   </button>
 */

/* ─── Base icon button (32×32, square, bordered) ─────────────────────── */
.tbl-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
    text-decoration: none;
}

/* ─── With label text (auto width) ──────────────────────────────────── */
.tbl-btn.tbl-btn-label {
    width: auto;
    padding: 0 0.7rem;
    gap: 0.35rem;
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.78rem;
}

/* ─── Restore / Undo (grey → green on hover) ─────────────────────────── */
.tbl-btn-restore {
    border-color: #d1d5db;
    color: #374151;
}
.tbl-btn-restore:hover {
    background: #f0fdf4;
    border-color: #16a34a;
    color: #16a34a;
}

/* ─── Delete / Danger (light red border, red icon) ──────────────────── */
.tbl-btn-delete {
    border-color: #fecaca;
    color: #dc2626;
    background: #fff;
}
.tbl-btn-delete:hover {
    background: #fef2f2;
    border-color: #f87171;
}

/* ─── Neutral / View (grey) ──────────────────────────────────────────── */
.tbl-btn-neutral {
    border-color: #d1d5db;
    color: #64748b;
}
.tbl-btn-neutral:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #374151;
}

/* ─── Primary / Claim (blue) ─────────────────────────────────────────── */
.tbl-btn-primary {
    border-color: #bfdbfe;
    color: #2563eb;
    background: #fff;
}
.tbl-btn-primary:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

/* ─── Warning / Amber ────────────────────────────────────────────────── */
.tbl-btn-warning {
    border-color: #fde68a;
    color: #d97706;
    background: #fff;
}
.tbl-btn-warning:hover {
    background: #fffbeb;
    border-color: #fbbf24;
}

/* ─── Success solid (green filled) ──────────────────────────────────── */
.tbl-btn-success {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.tbl-btn-success:hover {
    background: #15803d;
    border-color: #15803d;
}

/* ─── Disabled state ─────────────────────────────────────────────────── */
.tbl-btn:disabled,
.tbl-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   MODAL FOOTER BUTTONS
   Used in modal dialogs — cancel + submit patterns
   ═══════════════════════════════════════════════════════════════════════ */

/* Base modal button */
.modal-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.15s, opacity 0.15s;
    text-decoration: none;
    white-space: nowrap;
    border: none;
}

/* Cancel (neutral outlined) */
.modal-btn-cancel {
    border: 1.5px solid #d1d5db;
    background: #fff;
    color: #374151;
}
.modal-btn-cancel:hover {
    background: #f9fafb;
}

/* Modal submit — restore / confirm action (green) */
.modal-btn-restore {
    background: linear-gradient(135deg, #166534, #15803d);
    color: #fff;
    border: none;
}
.modal-btn-restore:hover {
    filter: brightness(1.08);
}

/* Modal submit — delete / destructive (red) */
.modal-btn-delete {
    background: linear-gradient(135deg, #7f1d1d, #b91c1c);
    color: #fff;
    border: none;
}
.modal-btn-delete:hover {
    opacity: 0.9;
}

/* Modal submit — suspend / amber */
.modal-btn-suspend {
    background: linear-gradient(135deg, #92400e, #b45309);
    color: #fff;
    border: none;
}
.modal-btn-suspend:hover {
    filter: brightness(1.08);
}

/* Modal close ×  (circle on coloured header) */
.modal-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: background 0.2s;
    flex-shrink: 0;
}
.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}
