﻿/* Layout */
body {
    background-color: #0a0a0a;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #ffffff;
}

.product-container {
    max-width: 1100px;
    margin: 40px auto;
    background: #111;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid #222;
}

/* Header */
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

    .product-header h2 {
        margin: 0;
        font-weight: 600;
    }

/* Table */
.product-table {
    width: 100%;
    border-collapse: collapse;
}

    .product-table th {
        background: #1a1a1a;
        color: #ccc;
        padding: 12px;
        text-align: left;
        border-bottom: 1px solid #333;
    }

    .product-table td {
        padding: 12px;
        border-bottom: 1px solid #222;
    }

    .product-table tr:hover {
        background: #181818;
    }

/* Badge */
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
}

.badge-neutral {
    background: #fff;
    color: #000;
}

.badge-muted {
    background: #333;
    color: #bbb;
}

/* Buttons */
.btn {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
    margin: 2px;
    border: 1px solid transparent;
}

/* Primary (Add) */
.btn-primary {
    background: #fff;
    color: #000;
}

/* Secondary (Edit) */
.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid #444;
}

/* Danger (Delete) */
.btn-danger {
    background: #e53935;
    color: #fff;
}

/* Hover */
.btn:hover {
    opacity: 0.85;
}

/* Utils */
.text-center {
    text-align: center;
}

.fw-bold {
    font-weight: 600;
}

.empty {
    color: #777;
    padding: 20px;
}
/* FIX: cho phép tooltip hiển thị ra ngoài table */
.product-table {
    overflow: visible;
}

.action-cell {
    position: relative;
    overflow: visible;
}

/* wrapper */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

/* icon button */
.btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #444;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

    .btn-icon:hover {
        background: #fff;
        color: #000;
    }

/* tooltip box */
.tooltip-box {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    background: #111;
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    border: 1px solid #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 9999;
}

    /* arrow */
    .tooltip-box::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-width: 6px;
        border-style: solid;
        border-color: #111 transparent transparent transparent;
    }

/* show tooltip */
.tooltip-wrapper:hover .tooltip-box {
    opacity: 1;
    visibility: visible;
}