/* Product Listing Table Block */

.product-listing-table-block {
    padding: 80px 0;
}

.plt-container {
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 20px;
}

.plt-title {
    color: #000;
    font-family: helvetica_lt_std_condensed, Arial, Helvetica, sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 15px;
    text-align: center;
    text-transform: none;
}

.plt-subtitle {
    color: #000;
    font-family: helvetica_lt_stdlight, Arial, Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    margin: 0 auto 50px;
    max-width: 700px;
    text-align: center;
}

/* Toolbar */
.plt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
}

/* Dropdown */
.plt-select-wrap {
    max-width: 320px;
}

/* CTA Phone */
.plt-cta-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #000;
    color: #fff !important;
    font-family: helvetica_lt_std_condensed, Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    border-radius: 6px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.plt-cta-phone:hover {
    background: #333;
}

.plt-cta-phone svg {
    flex-shrink: 0;
}

.plt-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-family: helvetica_lt_stdlight, Arial, Helvetica, sans-serif;
    font-size: 15px;
    color: #000 !important;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    opacity: 1 !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color 0.2s ease;
}

.plt-select option {
    color: #000;
}

.plt-select option[disabled] {
    color: #000;
}

.plt-select:hover {
    border-color: #999;
}

.plt-select:focus {
    outline: none;
    border-color: #666;
}

/* Panel */
.plt-panel {
    border: 1px solid #e0e5eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

/* Table */
.plt-table {
    width: 100%;
}

.plt-table-header {
    display: flex;
    border-bottom: 2px solid #e0e5eb;
    background: rgba(90, 122, 154, 0.08);
}

.plt-table-header .plt-cell {
    padding: 12px 16px;
    font-family: helvetica_lt_std_condensed, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #000;
}

/* Cell widths */
.plt-cell--product {
    flex: 0 0 18%;
    min-width: 100px;
}

.plt-cell--color {
    flex: 0 0 15%;
    min-width: 80px;
}

.plt-cell--format {
    flex: 0 0 18%;
    min-width: 80px;
}

.plt-cell--compat {
    flex: 1;
    min-width: 120px;
}

.plt-cell--code {
    flex: 0 0 15%;
    min-width: 100px;
    text-align: center;
    justify-content: center;
}

/* 4-column layout (no compat) */
.plt-table--cols-4 .plt-cell--product { flex: 0 0 25%; }
.plt-table--cols-4 .plt-cell--color { flex: 0 0 20%; }
.plt-table--cols-4 .plt-cell--format { flex: 0 0 30%; }
.plt-table--cols-4 .plt-cell--code { flex: 0 0 25%; }

/* 3-column layout (no color, no compat) */
.plt-table--cols-3 .plt-cell--product { flex: 0 0 35%; }
.plt-table--cols-3 .plt-cell--format { flex: 0 0 35%; }
.plt-table--cols-3 .plt-cell--code { flex: 0 0 30%; }

/* Rows */
.plt-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #e8ecf0;
    transition: background 0.2s ease;
}

.plt-row--even {
    background: #f8f9fa;
}

.plt-row--odd {
    background: #fff;
}

.plt-row:hover {
    background: #f0f4f8;
}

.plt-row:last-child {
    border-bottom: none;
}

/* Cells */
.plt-row .plt-cell {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    min-height: 50px;
}

.plt-cell-text {
    font-family: helvetica_lt_stdlight, Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.plt-cell-text--bold {
    font-family: helvetica_lt_std_condensed, Arial, Helvetica, sans-serif;
    font-weight: 700;
    color: #000;
}

/* Copy button */
.plt-copy-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 8px;
    padding: 0;
    background: none;
    border: 1px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    color: #999;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.plt-copy-btn:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
    border-color: #ddd;
}

.plt-copy-btn .plt-check-icon {
    display: none;
}

.plt-copy-btn--copied .plt-copy-icon {
    display: none;
}

.plt-copy-btn--copied .plt-check-icon {
    display: block;
    color: #22c55e;
}

.plt-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: #1a1a1a;
    color: #fff;
    font-family: helvetica_lt_stdlight, Arial, Helvetica, sans-serif;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.plt-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1a1a1a;
}

.plt-copy-btn:hover .plt-tooltip,
.plt-copy-btn--copied .plt-tooltip {
    opacity: 1;
}

/* Dark mode copy button */
body.dark-mode .plt-copy-btn {
    color: #666;
}

body.dark-mode .plt-copy-btn:hover {
    color: #ccc;
    background: rgba(255, 255, 255, 0.08);
    border-color: #444;
}

/* Skeleton placeholder */
.plt-skel-bar {
    display: block;
    height: 12px;
    width: 70%;
    background: #e8ecf0;
    border-radius: 6px;
    animation: pltSkelPulse 1.5s ease-in-out infinite;
}

.plt-skel-bar--sm {
    width: 50%;
}

.plt-skel-bar--lg {
    width: 85%;
}

@keyframes pltSkelPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes pltArrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.plt-skeleton-msg {
    text-align: center;
    padding: 18px 0;
    margin: 0;
    font-family: helvetica_lt_stdlight, Arial, Helvetica, sans-serif;
    font-size: 15px;
    color: #000;
    border-top: 1px solid #e8ecf0;
}

.plt-skeleton-msg .plt-arrow-bounce {
    display: inline-block;
    animation: pltArrowBounce 1.2s ease-in-out infinite;
}

body.dark-mode .plt-skel-bar {
    background: #2a2a2a;
}

body.dark-mode .plt-skeleton-msg {
    color: #fff;
    border-top-color: #333;
}

/* Mobile-only inherited values (hidden on desktop) */
.plt-mobile-only {
    display: none;
}

/* Footnotes */
.plt-footnotes {
    margin-top: 20px;
    padding: 0 10px;
}

.plt-footnotes p {
    font-family: helvetica_lt_stdlight, Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 5px;
}

.plt-footnotes a {
    color: #0066cc;
    text-decoration: underline;
}

.plt-footnotes a:hover {
    color: #004499;
}

/* Animation */
.plt-panel--active .plt-row {
    opacity: 0;
    transform: translateY(10px);
    animation: pltFadeIn 0.4s ease forwards;
}

.plt-panel--active .plt-row:nth-child(1) { animation-delay: 0.05s; }
.plt-panel--active .plt-row:nth-child(2) { animation-delay: 0.1s; }
.plt-panel--active .plt-row:nth-child(3) { animation-delay: 0.15s; }
.plt-panel--active .plt-row:nth-child(4) { animation-delay: 0.2s; }
.plt-panel--active .plt-row:nth-child(5) { animation-delay: 0.25s; }
.plt-panel--active .plt-row:nth-child(6) { animation-delay: 0.3s; }
.plt-panel--active .plt-row:nth-child(7) { animation-delay: 0.35s; }
.plt-panel--active .plt-row:nth-child(8) { animation-delay: 0.4s; }

@keyframes pltFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark Mode */
body.dark-mode .product-listing-table-block {
    background-color: #000 !important;
}

body.dark-mode .plt-title {
    color: #fff;
}

body.dark-mode .plt-subtitle {
    color: #ccc;
}

body.dark-mode .plt-cta-phone {
    background: #fff;
    color: #000 !important;
}

body.dark-mode .plt-cta-phone:hover {
    background: #ddd;
}

body.dark-mode .plt-select {
    background-color: #111;
    border-color: #444;
    color: #ddd;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

body.dark-mode .plt-select:hover {
    border-color: #666;
}

body.dark-mode .plt-select:focus {
    border-color: #888;
}

body.dark-mode .plt-panel {
    background: #111;
    border-color: #333;
}

body.dark-mode .plt-table-header {
    background: rgba(255, 255, 255, 0.08);
    border-bottom-color: #333;
}

body.dark-mode .plt-table-header .plt-cell {
    color: #fff;
}

body.dark-mode .plt-row {
    border-bottom-color: #222;
}

body.dark-mode .plt-row--even {
    background: #0a0a0a;
}

body.dark-mode .plt-row--odd {
    background: #111;
}

body.dark-mode .plt-row:hover {
    background: #1a1a1a;
}

body.dark-mode .plt-cell-text {
    color: #ccc;
}

body.dark-mode .plt-cell-text--bold {
    color: #fff;
}

body.dark-mode .plt-footnotes p {
    color: #999;
}


/* Tablet */
@media (max-width: 1024px) {
    .product-listing-table-block {
        padding: 60px 0;
    }

    .plt-cell--product { flex: 0 0 20%; }
    .plt-cell--color { flex: 0 0 15%; }
    .plt-cell--format { flex: 0 0 18%; }
    .plt-cell--code { flex: 0 0 15%; }
}

/* Mobile - card layout */
@media (max-width: 768px) {
    .product-listing-table-block {
        padding: 50px 0;
    }

    .plt-container {
        padding: 0 15px;
    }

    .plt-title {
        font-size: 1.75rem;
        padding: 0;
    }

    .plt-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .plt-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .plt-select-wrap {
        max-width: 100%;
    }

    .plt-cta-phone {
        justify-content: center;
        font-size: 14px;
        padding: 12px 20px;
    }

    /* Skeleton: hide table, keep message */
    .plt-panel--skeleton .plt-table {
        display: none;
    }

    .plt-skeleton-msg {
        border-top: none;
        padding: 30px 0;
        font-size: 14px;
    }

    /* Hide table header on mobile */
    .plt-table-header {
        display: none;
    }

    /* Stack rows as cards */
    .plt-row {
        flex-direction: column;
        padding: 14px 18px;
        gap: 4px;
    }

    .plt-row .plt-cell {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        padding: 4px 0;
        min-height: auto;
        justify-content: flex-start;
    }

    .plt-row .plt-cell::before {
        content: attr(data-label);
        font-family: helvetica_lt_std_condensed, Arial, Helvetica, sans-serif;
        font-size: 13px;
        font-weight: 700;
        color: #000;
        flex: 0 0 50%;
    }

    .plt-row .plt-cell .plt-cell-text {
        flex: 0 0 50%;
        text-align: left;
    }

    body.dark-mode .plt-row .plt-cell::before {
        color: #fff;
    }

    .plt-row .plt-cell:empty {
        display: none;
    }

    .plt-mobile-only {
        display: inline;
    }

    .plt-cell--product,
    .plt-cell--color,
    .plt-cell--format,
    .plt-cell--compat,
    .plt-cell--code {
        flex: none;
        min-width: auto;
        text-align: left;
    }

    .plt-footnotes {
        padding: 0;
    }

    /* Copy button in mobile cards */
    .plt-row .plt-cell--code {
        align-items: center;
    }

    .plt-row .plt-cell--code .plt-cell-text {
        flex: 0 0 auto;
    }

    .plt-copy-btn {
        margin-left: 6px;
    }

    .plt-tooltip {
        bottom: auto;
        top: calc(100% + 6px);
        left: auto;
        right: 0;
        transform: none;
    }

    .plt-tooltip::after {
        top: auto;
        bottom: 100%;
        left: auto;
        right: 8px;
        transform: none;
        border-top-color: transparent;
        border-bottom-color: #1a1a1a;
    }

}

@media (max-width: 480px) {
    .product-listing-table-block {
        padding: 40px 0;
    }

    .plt-title {
        font-size: 1.5rem;
    }

    .plt-row {
        padding: 10px 15px;
    }
}
