/* FacialProof Feature Tester Styles */

/* Override WordPress theme padding constraints */
.entry-content.wp-block-post-content.has-global-padding.is-layout-constrained.wp-block-post-content-is-layout-constrained,
.entry-content.wp-block-post-content.has-global-padding,
.entry-content.is-layout-constrained,
.wp-block-post-content.is-layout-constrained {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.facialproof-feature-tester {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    padding: 40px 20px;
    color: #1a1a1a;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    position: relative !important;
}

/* Override any WordPress theme constraints */
.facialproof-feature-tester .feature-content-container,
.facialproof-feature-tester .feature-html-content,
.facialproof-feature-tester .feature-html-wrapper,
.facialproof-feature-tester .feature-html-wrapper .container,
.facialproof-feature-tester .feature-html-wrapper .content,
.facialproof-feature-tester .feature-html-wrapper .demo-layout {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* Tabs Navigation - Rounded Pill/Button Group Style */
.feature-tester-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 8px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: visible;
    box-sizing: border-box;
}

.feature-tab {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50px;
    padding: 12px 20px;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    z-index: 1;
}

.feature-tab:hover {
    background: #f9f9f9;
    border-color: #d0d0d0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.feature-tab.active {
    color: #ffffff;
    background: var(--tab-color, #2271b1);
    border-color: var(--tab-color, #2271b1);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(34, 113, 177, 0.3);
    z-index: 10;
    transform: scale(1.05);
    white-space: normal;
}

.feature-tab .tab-icon {
    font-size: 18px;
    display: inline-block;
    transition: transform 0.2s ease;
    color: inherit;
}

.feature-tab:hover .tab-icon {
    transform: scale(1.05);
}

.feature-tab.active .tab-icon {
    transform: scale(1.05);
    color: #ffffff;
}

.feature-tab .tab-label {
    font-size: 15px;
    letter-spacing: 0;
    line-height: 1.4;
    display: inline-block;
}

.feature-tab .tab-description {
    display: none;
}

@media (max-width: 768px) {
    .facialproof-feature-tester {
        padding: 15px 8px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .feature-tester-tabs {
        display: flex !important;
        flex-direction: column !important;
        overflow-x: visible;
        overflow-y: visible;
        padding: 8px;
        margin-bottom: 20px;
        gap: 8px;
        background: #f5f5f5;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        position: relative;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .feature-tab {
        padding: 12px 16px;
        font-size: 14px;
        width: 100% !important;
        flex: 1 1 100% !important;
        min-width: 100% !important;
        min-height: 48px;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 8px;
        gap: 8px;
        white-space: normal;
        text-align: center;
        justify-content: center;
        box-sizing: border-box;
    }
    
    .feature-tab.active {
        background: var(--tab-color, #2271b1) !important;
        border-color: var(--tab-color, #2271b1) !important;
        color: #ffffff !important;
        box-shadow: 0 2px 6px rgba(34, 113, 177, 0.3);
        z-index: 10;
        transform: none;
        padding: 12px 16px;
    }
    
    .feature-tab:hover:not(.active) {
        background: #f9f9f9;
    }
    
    .feature-tab .tab-icon {
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .feature-tab .tab-label {
        font-size: 14px;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        width: 100%;
    }
    
    .feature-tab.active .tab-label {
        white-space: normal;
    }
    
    .feature-content-container {
        padding: 0 5px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .facialproof-feature-tester {
        padding: 10px 5px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .feature-tester-tabs {
        display: flex !important;
        flex-direction: column !important;
        padding: 6px;
        margin-bottom: 15px;
        gap: 6px;
        background: #f5f5f5;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .feature-tab {
        padding: 12px 14px;
        font-size: 13px;
        gap: 6px;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 8px;
        width: 100% !important;
        flex: 1 1 100% !important;
        min-width: 100% !important;
        min-height: 44px;
        justify-content: center;
        box-sizing: border-box;
    }
    
    .feature-tab .tab-icon {
        font-size: 16px;
        flex-shrink: 0;
    }
    
    .feature-tab .tab-label {
        font-size: 13px;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        width: 100%;
    }
    
    .feature-tab.active {
        background: var(--tab-color, #2271b1) !important;
        border-color: var(--tab-color, #2271b1) !important;
        color: #ffffff !important;
        box-shadow: 0 2px 6px rgba(34, 113, 177, 0.3);
        z-index: 10;
        transform: none;
        padding: 12px 14px;
    }
    
    .feature-tab.active .tab-label {
        font-size: 13px;
        white-space: normal;
    }
    
    .feature-content-container {
        padding: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 360px) {
    .facialproof-feature-tester {
        padding: 8px 3px;
    }
    
    .feature-tester-tabs {
        display: flex !important;
        flex-direction: column !important;
        background: #f5f5f5;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        padding: 6px;
        gap: 6px;
    }
    
    .feature-tab {
        padding: 10px 12px;
        gap: 6px;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 8px;
        width: 100% !important;
        flex: 1 1 100% !important;
        min-width: 100% !important;
        min-height: 40px;
        box-sizing: border-box;
    }
    
    .feature-tab .tab-label {
        display: inline-block;
        font-size: 12px;
        white-space: normal;
    }
    
    .feature-tab.active {
        padding: 10px 12px;
        gap: 6px;
        background: var(--tab-color, #2271b1) !important;
        border-color: var(--tab-color, #2271b1) !important;
        color: #ffffff !important;
        box-shadow: 0 2px 6px rgba(34, 113, 177, 0.3);
        z-index: 10;
        transform: none;
    }
    
    .feature-tab.active .tab-label {
        display: inline-block;
        font-size: 12px;
        white-space: normal;
    }
    
    .feature-tab .tab-icon {
        font-size: 16px;
    }
    
    .feature-tab:hover:not(.active) {
        background: #f9f9f9;
        border-color: #d0d0d0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    }
}

/* Feature Content */
.feature-content-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    position: relative;
    box-sizing: border-box;
}

.feature-html-wrapper {
    display: none;
}

.feature-html-wrapper.active {
    display: block;
}

.feature-html-content {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

.feature-loading,
.feature-error {
    padding: 40px;
    text-align: center;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    color: #646970;
}

.feature-error {
    color: #d63638;
    background: #fff5f5;
    border-color: #d63638;
}

/* Override HTML file styles to match dashboard */
.feature-html-wrapper body {
    background: #f5f5f5 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.feature-html-wrapper .container {
    background: #fff !important;
    border: 1px solid #ccd0d4 !important;
    box-shadow: 0 1px 1px rgba(0,0,0,.04) !important;
    border-radius: 4px !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.feature-html-wrapper .content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 24px !important;
}

@media (max-width: 1200px) {
    .feature-html-wrapper .content {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .feature-html-wrapper .content {
        grid-template-columns: 1fr !important;
        padding: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .feature-html-wrapper .container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .feature-html-wrapper .results {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .feature-html-wrapper .result-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .feature-content-container {
        padding: 0 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .feature-html-wrapper .container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 768px) {
    .feature-content-container {
        padding: 0 5px;
    }
    
    .feature-html-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .feature-content-container {
        padding: 0;
    }
}
