/**
 * WP Table Builder Pro - Frontend Styles
 * Styles for rendered tables on the public site
 */

/* ── Base Table ─────────────────────────────────────────────────────────────── */
.wptb-table {
    border-collapse: collapse;
    width: 100%;
    direction: rtl;
    font-family: 'IRANSans', Tahoma, Arial, sans-serif;
    font-size: 14px;
    margin: 1.5em 0;
    overflow: hidden;
}

.wptb-table td,
.wptb-table th {
    padding: 10px 14px;
    line-height: 1.5;
    vertical-align: middle;
}

/* ── Simple ─────────────────────────────────────────────────────────────────── */
.wptb-table.wptb-simple {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.wptb-table.wptb-simple th {
    background-color: #f5f5f5;
    color: #212121;
    font-weight: 700;
    border-bottom: 2px solid #e0e0e0;
}

.wptb-table.wptb-simple td,
.wptb-table.wptb-simple th {
    border: 1px solid #e0e0e0;
}

/* ── Zebra ──────────────────────────────────────────────────────────────────── */
.wptb-table.wptb-zebra {
    border: 1px solid #bbdefb;
    border-radius: 4px;
    overflow: hidden;
}

.wptb-table.wptb-zebra th {
    background-color: #1565c0;
    color: #ffffff;
    font-weight: 700;
}

.wptb-table.wptb-zebra tr:nth-child(even) td {
    background-color: #e3f2fd;
}

.wptb-table.wptb-zebra td,
.wptb-table.wptb-zebra th {
    border: 1px solid #bbdefb;
}

/* ── Modern ─────────────────────────────────────────────────────────────────── */
.wptb-table.wptb-modern {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.wptb-table.wptb-modern th {
    background-color: #212121;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.wptb-table.wptb-modern tr:nth-child(odd) td {
    background-color: #f5f5f5;
}

.wptb-table.wptb-modern td {
    border-bottom: 1px solid #e0e0e0;
}

.wptb-table.wptb-modern tr:hover td {
    background-color: #eeeeee;
    transition: background 0.15s;
}

/* ── Minimal ────────────────────────────────────────────────────────────────── */
.wptb-table.wptb-minimal {
    border: none;
}

.wptb-table.wptb-minimal td,
.wptb-table.wptb-minimal th {
    border: none;
    border-bottom: 1px solid #e0e0e0;
    background: transparent !important;
}

.wptb-table.wptb-minimal th {
    border-bottom: 2px solid #212121;
    font-weight: 700;
    color: #212121;
}

.wptb-table.wptb-minimal tr:last-child td {
    border-bottom: none;
}

/* ── Colorful ───────────────────────────────────────────────────────────────── */
.wptb-table.wptb-colorful {
    border: 1px solid #ce93d8;
    border-radius: 8px;
    overflow: hidden;
}

.wptb-table.wptb-colorful th {
    background-color: #7c4dff;
    color: #ffffff;
    font-weight: 700;
}

.wptb-table.wptb-colorful tr:nth-child(even) td {
    background-color: #f3e5f5;
}

.wptb-table.wptb-colorful tr:nth-child(odd) td {
    background-color: #e8eaf6;
}

.wptb-table.wptb-colorful td,
.wptb-table.wptb-colorful th {
    border: 1px solid #ce93d8;
}

/* ── Dark ───────────────────────────────────────────────────────────────────── */
.wptb-table.wptb-dark {
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
    background: #0d1117;
}

.wptb-table.wptb-dark th {
    background-color: #0d1117;
    color: #58a6ff;
    font-weight: 700;
    border-bottom: 1px solid #30363d;
}

.wptb-table.wptb-dark td {
    color: #c9d1d9;
    border: 1px solid #30363d;
}

.wptb-table.wptb-dark tr:nth-child(even) td {
    background-color: #161b22;
}

.wptb-table.wptb-dark tr:nth-child(odd) td {
    background-color: #21262d;
}

.wptb-table.wptb-dark tr:hover td {
    background-color: #2d333b !important;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .wptb-table {
        font-size: 12px;
    }

    .wptb-table td,
    .wptb-table th {
        padding: 7px 9px;
    }
}

.wptb-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
