/* Nad Woo Tabs Frontend Styles */

.nad-custom-tab-content {
    padding: 20px 0;
    line-height: 1.6;
    color: #333;
}

.nad-custom-tab-content h1,
.nad-custom-tab-content h2,
.nad-custom-tab-content h3,
.nad-custom-tab-content h4,
.nad-custom-tab-content h5,
.nad-custom-tab-content h6 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
}

.nad-custom-tab-content p {
    margin-bottom: 15px;
}

.nad-custom-tab-content ul,
.nad-custom-tab-content ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.nad-custom-tab-content li {
    margin-bottom: 8px;
}

.nad-custom-tab-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nad-custom-tab-content blockquote {
    border-left: 4px solid #0073aa;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

.nad-custom-tab-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.nad-custom-tab-content th,
.nad-custom-tab-content td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.nad-custom-tab-content th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.nad-custom-tab-content tr:hover {
    background-color: #f8f9fa;
}

/* List styling */
.nad-tab-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nad-tab-list li {
    position: relative;
    padding: 10px 0 10px 25px;
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
}

.nad-tab-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 10px;
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

.nad-tab-list li:last-child {
    border-bottom: none;
}

/* Key-Value List Frontend Styling */
.nad-tab-key-value-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nad-tab-key-value-list li {
    position: relative;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.nad-tab-key-value-list li:last-child {
    border-bottom: none;
}

.nad-tab-key-value-list strong {
    color: #2c3e50;
    font-weight: 600;
    min-width: 120px;
    flex-shrink: 0;
}

/* Single field styling */
.nad-single-field {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
    font-size: 16px;
    line-height: 1.6;
}

/* Responsive design */
@media (max-width: 768px) {
    .nad-custom-tab-content {
        padding: 15px 0;
    }
    
    .nad-custom-tab-content h1,
    .nad-custom-tab-content h2,
    .nad-custom-tab-content h3 {
        font-size: 1.5em;
    }
    
    .nad-custom-tab-content table {
        font-size: 14px;
    }
    
    .nad-custom-tab-content th,
    .nad-custom-tab-content td {
        padding: 8px;
    }
    
    .nad-single-field {
        padding: 15px;
        font-size: 14px;
    }
}

/* Print styles */
@media print {
    .nad-custom-tab-content {
        color: #000;
        background: #fff;
    }
    
    .nad-custom-tab-content img {
        box-shadow: none;
    }
    
    .nad-single-field {
        background: #fff;
        border: 1px solid #000;
    }
}

/* Animation for tab content */
.nad-custom-tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Custom styling for different content types */
.nad-content-type-rich-editor .nad-custom-tab-content {
    /* Rich editor specific styles */
}

.nad-content-type-list .nad-custom-tab-content {
    /* List specific styles */
}

.nad-content-type-single-field .nad-custom-tab-content {
    /* Single field specific styles */
}

.nad-content-type-builtin .nad-custom-tab-content {
    /* Built-in content specific styles */
}

/* Integration with WooCommerce tabs */
.woocommerce-tabs .nad-custom-tab-content {
    margin-top: 20px;
}

.woocommerce-tabs .panel .nad-custom-tab-content:first-child {
    margin-top: 0;
}

/* Custom tab styling for better integration */
.woocommerce-tabs .tabs .nad-tab-title {
    font-weight: 600;
}

.woocommerce-tabs .panel .nad-custom-tab-content {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Product custom tab content */
.nad-product-custom-tab-content {
    padding: 20px 0;
    line-height: 1.6;
    color: #333;
}

.nad-product-custom-tab-content h1,
.nad-product-custom-tab-content h2,
.nad-product-custom-tab-content h3,
.nad-product-custom-tab-content h4,
.nad-product-custom-tab-content h5,
.nad-product-custom-tab-content h6 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
}

.nad-product-custom-tab-content p {
    margin-bottom: 15px;
}

.nad-product-custom-tab-content ul,
.nad-product-custom-tab-content ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.nad-product-custom-tab-content li {
    margin-bottom: 8px;
}

.nad-product-custom-tab-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nad-product-custom-tab-content blockquote {
    border-left: 4px solid #0073aa;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

.nad-product-custom-tab-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.nad-product-custom-tab-content th,
.nad-product-custom-tab-content td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.nad-product-custom-tab-content th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.nad-product-custom-tab-content tr:hover {
    background-color: #f8f9fa;
}

/* Accessibility improvements */
.nad-custom-tab-content:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.nad-tab-list li:focus {
    background-color: #f0f8ff;
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nad-custom-tab-content {
        border: 1px solid #000;
    }
    
    .nad-single-field {
        border: 2px solid #000;
    }
    
    .nad-tab-list li:before {
        color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .nad-custom-tab-content {
        animation: none;
    }
}
