/**
 * Product Information Tab Styles
 * Scoped styles matching Features tab structure
 */

/* CSS Variables */
:root {
    --sm-sticky-offset: 120px;
    --sm-section-pad: 24px;
    --sm-section-pad-mobile: 16px;
}

/* Main wrapper - matches Features tab */
.sm-product-info-tab-content {
    padding: 0;
    max-width: 100%;
    background: #fff;
}

/* Overview section */
.sm-product-info-tab-content .sm-overview-single {
    margin: 0;
    padding: 0;
}

.sm-product-info-tab-content .sm-overview-content {
    line-height: 1.6;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.sm-overview-description {
    margin: 0 0 20px 0;
    padding: 16px 20px;
    font-size: 15px;
    color: #374151;
    line-height: 1.6;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.sm-overview-description p {
    margin-bottom: 15px;
}

.sm-overview-description p:last-child {
    margin-bottom: 0;
}

/* Pricing badge in overview */
.sm-overview-pricing {
    margin: 24px 0;
    padding: 20px 24px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--sm-primary, #2b6cb0);
}

.sm-overview-pricing h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #111827;
}

.sm-pricing-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.sm-pricing-badge.sm-pricing-free {
    background: #00c853;
    color: #fff;
}

.sm-pricing-badge.sm-pricing-freemium {
    background: #4caf50;
    color: #fff;
}

.sm-pricing-badge.sm-pricing-paid {
    background: #2196f3;
    color: #fff;
}

.sm-pricing-badge.sm-pricing-subscription {
    background: #ff9800;
    color: #fff;
}

.sm-pricing-features {
    margin-top: 12px;
}

.sm-pricing-feature {
    display: block;
    padding: 5px 0;
    font-size: 14px;
    color: #555;
}

/* Information Grid - Clean layout for key details */
.sm-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 28px 0 0 0;
    padding: 0;
}

.sm-info-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sm-info-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sm-info-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #6b7280;
    text-transform: uppercase;
}

.sm-info-value {
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    line-height: 1.5;
}

/* Sections - matches Features tab */
.sm-product-info-tab-content .sm-section {
    margin: 0 0 32px 0;
    padding: 20px var(--sm-section-pad, 24px);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.sm-product-info-tab-content .sm-section:first-child {
    margin-top: 0;
    padding-top: 20px;
}

/* Main section headings - large (Overview, Categories, Compatibility) - Matching Vendor Information style */
.sm-product-info-tab-content .sm-section h2 {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 20px 0 !important;
    line-height: 1.3 !important;
    padding: 0 !important;
    padding-bottom: 16px !important;
    border-bottom: 2px solid #e8e8e8 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

/* Pros and Cons title - keep main heading size */
.sm-pros-cons-title {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* How are these determined - smaller text on same line */
.sm-how-determined {
    font-size: 14px !important;
    font-weight: 400 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
}

.sm-how-determined-link {
    color: #2563eb !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    transition: color 0.2s ease !important;
}

.sm-how-determined-link:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

.sm-how-determined-link .dashicons {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
}

/* Remove blue gradient underline */
.sm-product-info-tab-content .sm-tab-header h2::after,
.sm-product-info-tab-content .sm-section h2::after {
    display: none !important;
    content: none !important;
}

/* Sub-headings inside sections - smaller (Pricing Model, etc.) */
.sm-product-info-tab-content .sm-section h3,
.sm-overview-pricing h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
}

/* Categories Section - Enhanced Modern Design */
.sm-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding: 0;
}

.sm-category-tag,
.sm-category-link,
.sm-detail-category-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

/* Hover effect with shine animation */
.sm-category-tag::before,
.sm-category-link::before,
.sm-detail-category-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.sm-category-tag:hover,
.sm-category-link:hover,
.sm-detail-category-link:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none !important;
}

.sm-category-tag:hover::before,
.sm-category-link:hover::before,
.sm-detail-category-link:hover::before {
    left: 100%;
}

.sm-category-tag:active,
.sm-category-link:active,
.sm-detail-category-link:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Alternative color schemes for variety */
.sm-category-tag:nth-child(3n+1),
.sm-category-link:nth-child(3n+1) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.25);
}

.sm-category-tag:nth-child(3n+1):hover,
.sm-category-link:nth-child(3n+1):hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.4);
}

.sm-category-tag:nth-child(3n+2),
.sm-category-link:nth-child(3n+2) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.25);
}

.sm-category-tag:nth-child(3n+2):hover,
.sm-category-link:nth-child(3n+2):hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.4);
}

/* Primary Category Styling */
.sm-category-primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.35) !important;
    font-weight: 700 !important;
    position: relative;
}

.sm-category-primary:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.5) !important;
}

.sm-primary-indicator {
    margin-left: 8px;
    font-size: 14px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    animation: sm-star-pulse 2s ease-in-out infinite;
}

@keyframes sm-star-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Focus state for accessibility */
.sm-category-tag:focus,
.sm-category-link:focus,
.sm-detail-category-link:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Compatibility */
.sm-compatibility {
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-size: 15px;
    color: #374151;
    border: none;
    margin: 16px 0 0 0;
    line-height: 1.6;
}

.sm-compatibility p {
    margin: 0;
}

/* Video container */
.sm-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
}

.sm-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sm-overview-detail-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .sm-overview-detail-item strong {
        flex: none;
    }
    
    .sm-section h2 {
        font-size: 20px;
    }
    
    .sm-section h3 {
        font-size: 18px;
    }
    
    /* How are these determined - smaller on mobile */
    .sm-how-determined-link {
        font-size: 12px !important;
    }
    
    .sm-how-determined-link .dashicons {
        font-size: 14px !important;
        width: 14px !important;
        height: 14px !important;
    }
    
    /* Categories responsive */
    .sm-categories {
        gap: 10px;
        margin-top: 16px;
    }
    
    .sm-category-tag,
    .sm-category-link,
    .sm-detail-category-link {
        padding: 10px 18px;
        font-size: 14px;
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .sm-categories {
        gap: 8px;
    }
    
    .sm-category-tag,
    .sm-category-link,
    .sm-detail-category-link {
        padding: 8px 16px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
    }
    
    /* Stack heading and link on very small screens if needed */
    .sm-product-info-tab-content .sm-section h2 {
        gap: 8px !important;
    }
    
    .sm-how-determined-link {
        font-size: 11px !important;
    }
}

/* ===================================
   PROS AND CONS SECTION STYLES
   =================================== */

.sm-pros-cons-section {
    margin: 32px 0 !important;
}

.sm-pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.sm-pros-container,
.sm-cons-container {
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.sm-pros-container {
    background: #f0fdf4;
    border-color: #86efac;
}

.sm-cons-container {
    background: #fef2f2;
    border-color: #fca5a5;
}

.sm-pros-container h3,
.sm-cons-container h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
    color: #111827 !important;
}

.sm-pro-icon,
.sm-con-icon {
    font-size: 20px;
}

.sm-feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sm-feature-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.sm-feature-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sm-feature-text {
    flex: 1;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.sm-selection-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 24px;
    padding: 0 8px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    margin-left: 12px;
}

.sm-no-features {
    padding: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    font-style: italic;
}

.sm-reviews-verification {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.sm-verified-reviews {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #059669;
    font-weight: 500;
}

.sm-verified-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: #ffffff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}

/* Tooltip Modal - Centered on all devices */
.sm-tooltip-modal,
#sm-pros-cons-tooltip-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 10000 !important;
    display: none !important; /* Hidden by default */
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    margin: 0 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Show modal when display is set to block via JavaScript */
.sm-tooltip-modal[style*="display: block"],
#sm-pros-cons-tooltip-modal[style*="display: block"],
.sm-tooltip-modal.sm-modal-open,
#sm-pros-cons-tooltip-modal.sm-modal-open {
    display: flex !important; /* Show as flex when opened */
    opacity: 1 !important;
    visibility: visible !important;
}

.sm-tooltip-modal-content,
#sm-pros-cons-tooltip-modal .sm-tooltip-modal-content {
    background: #ffffff !important;
    border-radius: 12px !important;
    max-width: 600px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    position: relative !important;
    margin: auto !important;
    transform: none !important;
}

.sm-tooltip-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sm-tooltip-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.sm-tooltip-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.sm-tooltip-header h3 {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin: 0 !important;
}

.sm-tooltip-body {
    padding: 24px;
}

.sm-tooltip-body p {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 16px;
}

.sm-tooltip-body ul {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.sm-tooltip-body ul li {
    padding: 12px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.sm-tooltip-body ul li:last-child {
    border-bottom: none;
}

.sm-tooltip-body ul li strong {
    color: #111827;
    font-weight: 600;
}

/* Modal Animation */
@keyframes sm-modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes sm-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Only animate when modal is open */
.sm-tooltip-modal.sm-modal-open,
#sm-pros-cons-tooltip-modal.sm-modal-open {
    animation: sm-modal-fade-in 0.2s ease-out;
}

.sm-tooltip-modal.sm-modal-open .sm-tooltip-modal-content,
#sm-pros-cons-tooltip-modal.sm-modal-open .sm-tooltip-modal-content {
    animation: sm-modal-slide-in 0.3s ease-out;
}

/* Responsive - Pros and Cons */
@media (max-width: 768px) {
    .sm-pros-cons-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .sm-feature-item {
        padding: 10px 12px;
    }
    
    .sm-feature-text {
        font-size: 13px;
    }
    
    .sm-selection-count {
        min-width: 28px;
        height: 22px;
        font-size: 11px;
    }
    
    /* Modal adjustments for mobile */
    .sm-tooltip-modal,
    #sm-pros-cons-tooltip-modal {
        padding: 10px !important;
    }
    
    .sm-tooltip-modal-content,
    #sm-pros-cons-tooltip-modal .sm-tooltip-modal-content {
        max-width: 100% !important;
        max-height: 95vh !important;
    }
}
