/**
 * Puppia SizeChart - Frontend Styles
 * All selectors prefixed with .pup-size- to avoid conflicts
 *
 * Override hover color in your theme:
 *   --pup-size-row-hover-bg   : #f7f7f7 (default)
 *   --pup-size-row-hover-text : #1e1e1e (default)
 */
:root {
    --pup-size-row-hover-bg   : #f7f7f7;
    --pup-size-row-hover-text : #1e1e1e;
}

/* ── Trigger Button ─────────────────────────────────────────── */
.pup-size-trigger-wrapper {
    margin: 12px 0;
}

.pup-size-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: transparent;
    border: 1.5px solid #333;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #333;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    text-transform: uppercase;
}

.pup-size-trigger-btn:hover,
.pup-size-trigger-btn:focus {
    background: #333;
    color: #fff;
    outline: none;
}

.pup-size-trigger-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ── Overlay ────────────────────────────────────────────────── */
.pup-size-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pup-size-overlay.pup-size-open {
    display: block;
}

.pup-size-overlay.pup-size-visible {
    opacity: 1;
}

/* ── Slide Panel ────────────────────────────────────────────── */
.pup-size-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 33%;
    min-width: 400px;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    color: #1e1e1e;
}

.pup-size-overlay.pup-size-visible .pup-size-panel {
    transform: translateX(0);
}

/* ── Panel Header ───────────────────────────────────────────── */
.pup-size-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.pup-size-panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #1e1e1e;
}

.pup-size-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #555;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pup-size-close-btn:hover,
.pup-size-close-btn:focus {
    background: #f0f0f0;
    color: #1e1e1e;
    outline: none;
}

/* ── Panel Body ─────────────────────────────────────────────── */
.pup-size-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    -webkit-overflow-scrolling: touch;
}

.pup-size-loading {
    text-align: center;
    padding: 40px 0;
    color: #888;
    font-size: 14px;
}

/* ── Size Chart Content ─────────────────────────────────────── */
.pup-size-chart-wrap {
    color: #1e1e1e;
}

/* Chart title (replaces type-label) */
.pup-size-chart-title {
    font-size: 16px;
    font-weight: 400;
    color: #1e1e1e;
    text-align: center;
    margin: 0 0 20px;
    letter-spacing: 0.03em;
}

/* ── Table ──────────────────────────────────────────────────── */
.pup-size-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.pup-size-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
    color: #1e1e1e;
}

/* Column widths: Size 10%, Neck 30%, Chest 30%, Length 30% */
.pup-size-table .pup-size-col-size   { width: 10%; }
.pup-size-table .pup-size-col-neck   { width: 30%; }
.pup-size-table .pup-size-col-chest  { width: 30%; }
.pup-size-table .pup-size-col-length { width: 30%; }

.pup-size-th {
    padding: 10px 12px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #1e1e1e;
    background: #f7f7f7;
    border-bottom: 2px solid #e0e0e0;
}

.pup-size-td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    color: #1e1e1e;
}

.pup-size-col-size.pup-size-td {
    font-weight: 700;
    text-transform: uppercase;
}

.pup-size-tbody-row {
    transition: background 0.15s;
}

.pup-size-tbody-row:hover .pup-size-td {
    background: var(--pup-size-row-hover-bg, #f7f7f7);
    color:      var(--pup-size-row-hover-text, #1e1e1e);
    cursor:     default;
}

.pup-size-tbody-row:last-child .pup-size-td {
    border-bottom: none;
}

/* ── Custom Block ───────────────────────────────────────────── */
.pup-size-custom-block {
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
    font-size: 13px;
    color: #1e1e1e;
    line-height: 1.6;
    text-align: center;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .pup-size-panel {
        width: 100%;
        min-width: 0;
    }
}

/* ── Scrollbar ──────────────────────────────────────────────── */
.pup-size-panel-body::-webkit-scrollbar {
    width: 5px;
}
.pup-size-panel-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.pup-size-panel-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
