/**
 * Frontend Styles for Custom Product Tabs for WooCommerce
 * Matches the clean, modern pill-tabbed interface with technical specification table design.
 */

.wc-cpt-wrapper {
    margin: 30px 0;
    font-family: inherit;
    clear: both;
}

/* Tab Navigation Container */
.wc-cpt-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0;
    list-style: none;
}

/* Individual Tab Button */
.wc-cpt-btn {
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
    color: #2d3748;
    border: 1.5px solid #2d3748;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

/* Hover State */
.wc-cpt-btn:hover {
    background-color: #f8fafc;
    border-color: #133e6f;
    color: #133e6f;
}

/* Active State (Dark Navy Pill as shown in screenshot) */
.wc-cpt-btn.active {
    background-color: #133e6f;
    border-color: #133e6f;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(19, 62, 111, 0.15), 0 2px 4px -1px rgba(19, 62, 111, 0.1);
}

/* Focus outline for accessibility */
.wc-cpt-btn:focus-visible {
    outline: 2px solid #133e6f;
    outline-offset: 2px;
}

/* Panels Area */
.wc-cpt-panels {
    background-color: #ffffff;
    width: 100%;
}

.wc-cpt-panel {
    display: none;
    animation: wcCptFadeIn 0.25s ease-in-out;
}

.wc-cpt-panel.active {
    display: block;
}

@keyframes wcCptFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Area inside Tab */
.wc-cpt-content {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
}

.wc-cpt-content p {
    margin-bottom: 1em;
}

/* Tables Styling (Auto-styled to match the technical specifications table screenshot) */
.wc-cpt-content table,
.wc-cpt-specs-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 16px 0;
    font-size: 15px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.wc-cpt-content table thead th,
.wc-cpt-specs-table thead th {
    background-color: #f3f4f6;
    color: #111827;
    font-weight: 600;
    text-align: left;
    padding: 14px 20px;
    border-bottom: 2px solid #e5e7eb;
}

.wc-cpt-content table tbody tr,
.wc-cpt-specs-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s ease;
}

/* Subtle Zebra Striping */
.wc-cpt-content table tbody tr:nth-child(even),
.wc-cpt-specs-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.wc-cpt-content table tbody tr:hover,
.wc-cpt-specs-table tbody tr:hover {
    background-color: #f1f5f9;
}

.wc-cpt-content table td,
.wc-cpt-specs-table td {
    padding: 14px 20px;
    vertical-align: top;
    color: #374151;
    border: none;
    border-right: 1px solid #f1f5f9;
}

.wc-cpt-content table td:last-child,
.wc-cpt-specs-table td:last-child {
    border-right: none;
}

.wc-cpt-content table td:first-child,
.wc-cpt-specs-table td:first-child {
    width: 25%;
    min-width: 160px;
    font-weight: 600;
    color: #1f2937;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wc-cpt-nav {
        gap: 8px;
    }

    .wc-cpt-btn {
        padding: 8px 16px;
        font-size: 14px;
        flex: 1 1 auto;
    }

    .wc-cpt-content table td:first-child,
    .wc-cpt-specs-table td:first-child {
        width: 35%;
        min-width: 120px;
    }

    .wc-cpt-content table td,
    .wc-cpt-specs-table td {
        padding: 10px 14px;
        font-size: 14px;
    }
}
