/* Software Detail Page - Optimized CSS */

/* CSS Variables */
.software-detail-wrapper {
    --sm-primary: #2b6cb0;
    --sm-primary-hover: #2c5282;
    --sm-secondary: #4a5568;
    --sm-light-bg: #f7fafc;
    --sm-border-color: #e2e8f0;
    --sm-text-color: #2d3748;
    --sm-text-light: #718096;
    --sm-star-color: #ffb900;
    --sm-star-empty: #e2e8f0;
    --sm-star-hover: #ffca28;
    --sm-star-shadow: rgba(255, 185, 0, 0.5);
    --sm-pros-color: #48bb78;
    --sm-cons-color: #f56565;
    --sm-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --sm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sm-radius: 0.375rem;
}

/* Base Wrapper */
.software-detail-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background-color: var(--sm-light-bg);
    padding: 80px 0 0 0;
    margin: 0 auto;
}

/* Main Container */
.sm-software-detail {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    color: var(--sm-text-color);
    line-height: 1.5;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.sm-software-detail.full-width {
    max-width: 100%;
    padding: 0;
    width: 100%;
}

.sm-detail-container {
    margin: 0;
    padding: 0 5%;
    width: 100%;
    box-sizing: border-box;
}

/* Header Styles */
.sm-detail-header {
    position: relative;
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
    width: 100%;
    margin-bottom: 0;
}

.sm-header-content {
    display: flex;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    gap: 30px;
}

.sm-header-left {
    display: flex;
    align-items: center;
    width: 260px;
    min-width: 260px;
    padding: 15px;
    position: relative;
}

.sm-software-logo {
    width: 100%;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    border-radius: 0;
    border: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.sm-badge-top {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: auto;
}

.sm-header-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sm-header-main h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    color: #111827;
    line-height: 1.2;
}

.sm-header-byline {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    color: #4b5563;
}

.sm-header-byline a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.sm-header-rating-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
}

.sm-header-weighted-rating {
    display: flex;
    align-items: center;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed #e2e8f0;
}

.sm-rating-type {
    font-size: 0.85em;
    color: #718096;
    margin-left: 5px;
    font-style: italic;
}

.sm-header-stars {
    display: flex;
    align-items: center;
}

.sm-header-star {
    color: #f59e0b;
    font-size: 24px;
}

.sm-header-star-empty {
    color: #d1d5db;
    font-size: 24px;
}

.sm-header-star-half {
    position: relative;
    font-size: 24px;
}

.sm-header-star-half:before {
    content: "★";
    color: #f59e0b;
    position: absolute;
    width: 50%;
    overflow: hidden;
}

.sm-header-star-half:after {
    content: "★";
    color: #d1d5db;
}

.sm-header-review-count {
    font-size: 16px;
    font-weight: 600;
    color: #6366f1;
}

.sm-header-actions {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.sm-action-button {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
}

.sm-action-button:hover {
    color: #111827;
}

.sm-action-button i {
    font-size: 18px;
}

.sm-action-button.save-button {
    color: #ef4444;
}

.sm-action-button.claimed-button {
    color: #10b981;
}

.sm-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Navigation */
.sm-header-nav {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
}

.sm-software-detail .sm-header-tabs,
.sm-software-detail .sm-detail-tabs {
    list-style: none !important;
    display: flex;
    margin: 0;
    padding: 0 20px;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.sm-header-tabs li,
.sm-detail-tabs li {
    margin: 0;
}

.sm-header-tabs a,
.sm-detail-tabs a {
    display: block;
    padding: 12px 20px;
    color: #4b5563;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    font-size: 15px;
}

.sm-header-tabs li.active a,
.sm-detail-tabs li.active a {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

.sm-header-tabs a:hover,
.sm-detail-tabs a:hover {
    color: #2563eb;
}

/* Header Buttons - Consistent Styling */
.sm-write-review-btn,
.sm-visit-website-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    min-width: 140px;
    height: 44px;
    box-sizing: border-box;
    border: 1px solid transparent;
    outline: none;
}

.sm-write-review-btn {
    background-color: white;
    color: #2563eb;
    border-color: #2563eb;
}

.sm-write-review-btn:hover {
    background-color: #f0f5ff;
    border-color: #1d4ed8;
    color: #1d4ed8;
}

.sm-visit-website-btn {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

.sm-visit-website-btn:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    color: white;
}

/* Tab Content */
.sm-software-detail .sm-tab-content {
    margin: 30px 0;
    width: 100%;
}

.sm-software-detail .sm-tab-pane {
    display: none;
    animation: fadeIn 0.3s;
}

.sm-software-detail .sm-tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Overview Grid */
.sm-overview-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    width: 100%;
}

.sm-section {
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.sm-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--sm-text-color);
    font-weight: 600;
}

.sm-overview,
.sm-description,
.sm-compatibility {
    color: var(--sm-text-light);
    line-height: 1.7;
}

/* Categories */
.sm-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sm-category-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #e8f0fe;
    color: var(--sm-primary);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.sm-category-tag:hover {
    background: #d2e3fc;
}

/* Video Container */
.sm-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--sm-radius);
}

.sm-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Highlights and Features */
.sm-highlights-box,
.sm-features-box {
    background: white;
    padding: 1.5rem;
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
    margin-bottom: 1.5rem;
}

.sm-highlights-box h3,
.sm-features-box h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.sm-highlights-list {
    padding: 0;
    margin: 0;
}

.sm-highlights-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.sm-highlight-icon {
    font-size: 1.25rem;
}

.sm-highlight-text {
    flex: 1;
}

.sm-features-grid {
    display: grid;
    gap: 1rem;
}

.sm-feature-item {
    display: flex;
    gap: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
    flex-wrap: wrap;
}

.sm-feature-number {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sm-primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    flex-shrink: 0;
}

.sm-feature-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.sm-feature-content p {
    color: var(--sm-text-light);
    margin: 0;
}

/* Pricing */
.sm-pricing-box {
    background: white;
    padding: 1.5rem;
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
    margin-bottom: 1.5rem;
}

.sm-pricing-info {
    color: var(--sm-text-light);
    margin-bottom: 1.5rem;
}

.sm-pricing-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--sm-primary);
    color: white;
    border-radius: var(--sm-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.sm-pricing-button:hover {
    background: var(--sm-primary-hover);
    color: white;
}

/* Integrations */
.sm-integrations-box {
    background: white;
    padding: 1.5rem;
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
    margin-bottom: 1.5rem;
}

.sm-integrations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.sm-integration-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
}

.sm-integration-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sm-light-bg);
    border-radius: 50%;
    color: var(--sm-primary);
}

.sm-integration-name {
    font-weight: 500;
}

/* Write Review Section */
.sm-write-review-section {
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
}

.sm-write-review-container {
    text-align: center;
}

/* Similar Software */
.sm-similar-software {
    margin: 4rem 0;
    padding: 0 2rem;
}

.sm-similar-heading-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-top: 1rem;
}

.sm-similar-software-title {
    font-size: 1.5rem;
    margin: 0;
}

.sm-similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

.sm-similar-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
}

.sm-similar-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sm-shadow-md);
}

.sm-card-logo {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin: 0 auto 1rem;
}

.sm-card-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.sm-similar-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.sm-similar-load {
    padding: 0.75rem 1.5rem;
    background: var(--sm-primary);
    color: white;
    border: none;
    border-radius: var(--sm-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.sm-similar-load:hover {
    background: var(--sm-primary-hover);
}

/* Review Modal */
.sm-review-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.sm-review-modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow-md);
}

.sm-review-form-steps {
    padding: 2rem;
}

/* Vendor Information */
.software-vendor-information {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 24px;
    margin: 30px 0;
}

.vendor-section-title {
    font-size: 20px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
    color: #1f2937;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.vendor-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.vendor-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vendor-detail-icon {
    font-size: 18px;
    color: #4b5563;
    min-width: 24px;
    text-align: center;
}

.vendor-detail-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.vendor-detail-label {
    font-weight: 600;
    color: #4b5563;
}

.vendor-detail-value {
    color: #1f2937;
}

.vendor-detail-value a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.vendor-detail-value a:hover {
    text-decoration: underline;
}

.vendor-overview {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.vendor-overview h4 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
    color: #1f2937;
}

.vendor-description {
    color: #4b5563;
    line-height: 1.6;
}

.vendor-pros-cons {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.vendor-pros-cons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.vendor-pros h4,
.vendor-cons h4 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 16px;
}

.vendor-pros h4 {
    color: #10b981;
}

.vendor-cons h4 {
    color: #ef4444;
}

.vendor-pros-list,
.vendor-cons-list {
    margin: 0;
    padding: 0;
}

.vendor-pro-item,
.vendor-con-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.vendor-pro-icon,
.vendor-con-icon {
    flex-shrink: 0;
}

.vendor-pro-text,
.vendor-con-text {
    color: #4b5563;
    line-height: 1.5;
}

/* Pros & Cons Section */
.sm-pros-cons-section {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    padding: 24px 32px;
    margin: 30px 0;
    width: 100%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.sm-pros-cons-section h2 {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #111827;
}

.sm-pros-cons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
}

.sm-pros-container,
.sm-cons-container {
    padding: 0;
}

.sm-pros-container h3,
.sm-cons-container h3 {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.sm-pros-container h3 {
    color: #10b981;
}

.sm-cons-container h3 {
    color: #ef4444;
}

.sm-pro-icon,
.sm-con-icon {
    margin-right: 8px;
}

.sm-feature-list {
    border-top: none;
    padding-top: 0;
}

.sm-feature-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: none;
}

.sm-feature-text {
    font-size: 16px;
    text-decoration: underline;
    color: #4b5563;
    font-weight: 500;
    cursor: pointer;
}

.sm-selection-count {
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    text-align: right;
    min-width: 40px;
}

.sm-no-features {
    color: var(--sm-text-light);
    font-style: italic;
}

.sm-reviews-verification {
    margin-top: 20px;
    padding-top: 20px;
    border-top: none;
}

.sm-verified-reviews {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #4b5563;
    font-weight: normal;
}

.sm-verified-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #6366f1;
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 12px;
}

.sm-how-determined {
    color: #6366f1;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sm-how-determined .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    border-radius: 50%;
    background: #6366f1;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Reviews Tab Visibility Fix */
#reviews.active,
#reviews.sm-tab-pane.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    position: static !important;
    z-index: 5 !important;
}

#reviews.active .sm-reviews-section,
#reviews.active .sm-reviews-header,
#reviews.active .sm-reviews-list,
#reviews.active .sm-reviews-filters,
#reviews.active .sm-review-highlights,
.sm-tab-pane#reviews.active * {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
}

#reviews.active .sm-review-highlights {
    display: flex !important;
}

/* Fix theme conflicts */
.sm-software-detail *,
.sm-software-detail *::before,
.sm-software-detail *::after {
    box-sizing: border-box;
}

.sm-software-detail h1,
.sm-software-detail h2,
.sm-software-detail h3,
.sm-software-detail h4,
.sm-software-detail h5,
.sm-software-detail h6 {
    margin-top: 0;
    line-height: 1.2;
    font-family: inherit;
}

.sm-software-detail ul,
.sm-software-detail ol {
    margin-top: 0;
    margin-bottom: 1rem;
}

.sm-software-detail .sm-detail-tabs a:focus {
    outline: none;
    text-decoration: none;
}

.sm-software-detail button {
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sm-overview-grid {
        grid-template-columns: 1fr;
    }
    
    .sm-pros-cons-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .sm-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sm-header-left {
        width: 200px;
        min-width: 200px;
    }
    
    .sm-software-logo {
        max-height: 120px;
    }
    
    .sm-header-right {
        width: 100%;
        margin-top: 1rem;
        justify-content: space-between;
    }
    
    .sm-header-actions {
        flex-wrap: wrap;
    }
    
    .sm-badge-top {
        width: 60px;
        top: -15px;
        right: -15px;
    }
    
    .sm-write-review-btn,
    .sm-visit-website-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 120px;
        height: 40px;
    }
    
    .sm-feature-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sm-feature-number {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }
    
    .sm-similar-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .vendor-details,
    .vendor-pros-cons-container {
        grid-template-columns: 1fr;
    }
    
    .sm-detail-tabs a {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .sm-software-detail {
        padding: 0 0.5rem;
    }
    
    .sm-header-right {
        flex-direction: column;
        width: 100%;
    }
    
    .sm-write-review-btn,
    .sm-visit-website-btn {
        width: 100%;
    }
    
    .sm-similar-grid {
        grid-template-columns: 1fr;
    }
}

