/**
 * Single Theme Profile Styles - STYLEGUIDE.md Compliant
 * Essential custom styles that cannot be replaced with Tailwind classes
 * 
 * @package WPAgent
 * @since 1.0.0
 */

/* CSS Custom Properties - Lavender Fields from STYLEGUIDE.md */
.wpagent-profile {
    --primary-purple: #8b5cf6;
    --primary-purple-hover: #a78bfa;
    --primary-purple-dark: #7c3aed;
    --primary-purple-darker: #6d28d9;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --danger-red: #ef4444;
    --gray-light: #f8f9fa;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;

    /* Border Radius Design Tokens */
    --radius-sm: 0.25rem;
    /* 4px - Small inputs, badges */
    --radius-md: 0.5rem;
    /* 8px - Buttons, cards */
    --radius-lg: 0.75rem;
    /* 12px - Large cards, modals */
    --radius-xl: 1rem;
    /* 16px - Hero sections */
    --radius-pill: 9999px;
    /* Full rounded - Pills, avatars */
}



.wpagent-profile {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-light);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 20px 0;
}

/* Card body padding override - fixes Kadence conflicts */
.wpagent-profile .card-body {
    padding: 20px !important;
}

.wpagent-profile .card-body-lg {
    padding: 24px !important;
}

/* Global container class - STYLEGUIDE.md compliant */
.wpagent-content-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Section spacing - consistent gaps between cards */
.wpagent-profile section,
.wpagent-profile .wpagent-content-container>section,
.wpagent-profile .wpagent-content-container>div {
    margin-bottom: 2rem;
}

/* Remove extra margin from last section */
.wpagent-profile section:last-child,
.wpagent-profile .wpagent-content-container>section:last-child,
.wpagent-profile .wpagent-content-container>div:last-child {
    margin-bottom: 0;
}

/* AI Summary Styles - STYLEGUIDE.md Colors */
.theme-ai-summary {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    margin: 1.875rem 0;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.ai-summary-header {
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--primary-purple);
    padding-bottom: 0.9375rem;
}

.ai-summary-header .section-title {
    color: var(--primary-purple);
    font-size: 1.5rem;
    margin: 0 0 0.625rem 0;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ai-summary-header .ai-icon:before {
    content: "🤖";
    margin-right: 0.5rem;
}

.confidence-score strong {
    color: var(--success-green);
}

.ai-summary-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--radius-sm);
    padding: 0.625rem 0.9375rem;
    font-style: italic;
    color: #856404;
}

.ai-summary-disclaimer .info-icon:before {
    content: "ℹ️";
    margin-right: 0.3125rem;
}

/* Plugin Compatibility Styles - STYLEGUIDE.md Colors */
.compatibility-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid #e5e7eb;
}

.plugin-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.plugin-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

/* Plugin Icon Colors - STYLEGUIDE.md Palette */
.plugin-icon.woocommerce {
    background: #96588a;
}

.plugin-icon.elementor {
    background: #92003b;
}

.plugin-icon.yoast {
    background: #a4286a;
}

.plugin-icon.cf7 {
    background: var(--primary-purple);
}

.plugin-icon.wpml {
    background: #7b68ee;
}

.plugin-icon.gravity {
    background: var(--text-primary);
}

.plugin-icon.acf {
    background: #00758f;
}

.plugin-icon.rocket {
    background: var(--warning-orange);
}

.plugin-icon.default-plugin {
    background: var(--text-secondary);
}

.plugin-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.overall-score {
    display: inline-flex;
    align-items: center;
    color: white;
    padding: 0.1875rem 0.625rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Score Colors - STYLEGUIDE.md Rating System */
.excellent {
    background: var(--success-green);
}

.good {
    background: var(--primary-purple);
}

.fair {
    background: var(--warning-orange);
}

.poor {
    background: var(--danger-red);
}

.none {
    background: var(--text-secondary);
}

/* Status Indicator Colors */
.status-excellent {
    background: #d1fae5;
    color: #065f46;
}

.status-good {
    background: #f3e8ff;
    color: var(--primary-purple-dark);
}

.status-fair {
    background: #fef3c7;
    color: #92400e;
}

.status-poor {
    background: #fee2e2;
    color: #991b1b;
}

.status-none {
    background: #f3f4f6;
    color: #374151;
}

/* Feature Grid - Responsive Design */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.875rem;
}

.feature-item {
    padding: 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    background: white;
    transition: all 0.2s ease;
}

.feature-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Progress Bar - STYLEGUIDE.md Colors */
.progress-bar {
    width: 100%;
    height: 0.375rem;
    background: #e5e7eb;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.8s ease-in-out;
    border-radius: var(--radius-sm);
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-md);
    font-size: 0.6875rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.1875rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, visibility 0.2s;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    opacity: 1;
    visibility: visible;
    max-width: 11.25rem;
    white-space: normal;
}

/* Sidebar Styles - STYLEGUIDE.md Compliant */
.wpagent-sidebar-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 1.25rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

/* Sidebar Card - Variant B Pattern */
.sidebar-card {
    background: #fff;
    border: 2px solid #1e293b !important;
    border-radius: 16px;
    overflow: hidden;
}

/* Action Section - STYLEGUIDE.md Button Styles */
.wpagent-demo-btn {
    width: 100%;
    height: 3rem;
    background: var(--primary-purple);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.75rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.wpagent-demo-btn:hover {
    background: var(--primary-purple-hover);
    transform: scale(1.05);
}

.wpagent-buy-btn {
    width: 8.75rem;
    height: 2.5rem;
    background: var(--warning-orange);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.wpagent-buy-btn:hover {
    background: #d97706;
}

/* ========================================
   THEME HERO GALLERY BACKGROUND
   ======================================== */

/* Hero with gallery background - full width */
.theme-hero {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
}

.theme-hero-with-gallery {
    min-height: 25rem;
}

/* Gallery background container */
.theme-hero .gallery-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* Gallery overlay - STYLEGUIDE.md Gradient */
.theme-hero .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.45) 0%, rgba(167, 139, 250, 0.45) 50%, rgba(124, 58, 237, 0.45) 100%);
    z-index: 1;
}

/* Ensure content is above gallery */
.theme-hero .wpagent-content-container {
    position: relative;
    z-index: 10;
}

/* ========================================
   SCREENSHOTS GALLERY ENHANCED
   ======================================== */

.wpagent-screenshot-container {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #f8f9fa;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.wpagent-screenshot-container:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px) translateZ(0);
}

.screenshot-wrapper {
    position: relative;
    width: 100%;
    height: 18.75rem;
    overflow: hidden;
    background: #e5e7eb;
    border-radius: var(--radius-lg);
}

.wpagent-screenshot-img {
    width: 100%;
    height: auto;
    min-height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
    transition: object-position 3000ms ease-in-out;
    will-change: object-position;
}

.wpagent-screenshot-container:hover .wpagent-screenshot-img {
    object-position: bottom center;
}

/* Overlay with information */
.screenshot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 30%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.25rem;
}

.wpagent-screenshot-container:hover .screenshot-overlay {
    opacity: 1;
}

/* Progress indicator */
.wpagent-screenshot-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0.25rem;
    height: 0%;
    background: linear-gradient(to bottom, var(--primary-purple), var(--primary-purple-dark));
    transition: height 3000ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
    border-radius: 0 0.75rem 0 0;
}

.wpagent-screenshot-container:hover::after {
    height: 100%;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .wpagent-container {
        flex-direction: column;
        gap: 1.25rem;
    }

    .wpagent-main-content,
    .wpagent-sidebar {
        width: 100%;
    }

    .wpagent-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .plugin-header {
        flex-direction: column;
        text-align: center;
    }

    .plugin-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .wpagent-screenshot-img {
        transition-duration: 2500ms;
    }

    .wpagent-screenshot-container::after {
        transition-duration: 2500ms;
    }
}


/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .wpagent-screenshot-img {
        transition-duration: 0.3s !important;
    }

    .wpagent-screenshot-container::after {
        transition-duration: 0.3s !important;
    }

    .wpagent-screenshot-container:hover .wpagent-screenshot-img {
        object-position: top center;
    }
}