/**
 * Elementor Solution Template Widget Styles
 */

/* Widget Container - Original */
.solution-template-widget {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    margin: 20px 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-height: 400px;
}

.solution-template-widget:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 16px rgba(0, 115, 170, 0.1);
}

/* Editor Widget Container */
.solution-template-widget-editor {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin: 10px 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.solution-template-widget-editor:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.12);
}

/* Editor Header */
.widget-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    border-bottom: 1px solid #f1f3f4;
}

.widget-editor-header .widget-icon {
    font-size: 20px;
    margin-right: 10px;
}

.widget-editor-header .widget-title {
    flex: 1;
}

.widget-editor-header .widget-title h3 {
    margin: 0 0 2px 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.widget-editor-header .widget-title p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.8);
}

.widget-actions-header {
    display: flex;
    gap: 8px;
}

.widget-actions-header .button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 11px;
    text-decoration: none;
}

.widget-actions-header .button-primary {
    background: rgba(255, 255, 255, 0.9);
    color: #0073aa;
}

.widget-actions-header .button-primary:hover {
    background: white;
    color: #005a87;
}

.widget-actions-header .button-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.widget-actions-header .button-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Editor Content */
.widget-editor-content {
    max-height: 600px;
    overflow-y: auto;
    background: #f8f9fa;
}

/* Preview Sections Styling */
.preview-section {
    margin: 0;
    position: relative;
}

.preview-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
    z-index: 10;
}

/* Testimonials Preview Grid */
.testimonial-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.testimonial-preview-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Widget Header */
.widget-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f3f4;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
}

.widget-icon {
    font-size: 24px;
    margin-right: 12px;
}

.widget-title h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.widget-title p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.8);
}

/* Widget Preview Tabs */
.widget-preview-tabs {
    flex: 1;
}

.tab-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tab-button:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-button.active {
    background: white;
    color: #0073aa;
    font-weight: 600;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0073aa;
}

.demo-tabs .tab-content {
    padding: 24px;
}

.tab-content.active {
    display: block;
}

/* Sections Grid */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.section-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.section-card:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
    transform: translateY(-2px);
}

.section-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0073aa, #00a0d2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.section-info {
    flex: 1;
}

.section-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #212529;
}

.section-info p {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.section-info small {
    font-size: 12px;
    color: #adb5bd;
}

.section-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.section-status.enabled {
    background: #28a745;
    color: white;
}

/* Preview Container */
.preview-container {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #e1e5e9;
}

.preview-controls {
    display: flex;
    gap: 8px;
}

.preview-device {
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-device:hover {
    background: #e9ecef;
}

.preview-device.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.preview-frame {
    padding: 16px;
    transition: all 0.3s ease;
}

.preview-frame.tablet {
    max-width: 768px;
    margin: 0 auto;
}

.preview-frame.mobile {
    max-width: 375px;
    margin: 0 auto;
}

.preview-sections {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-section {
    border-bottom: 1px solid #f1f3f4;
    padding: 16px;
}

.preview-section:last-child {
    border-bottom: none;
}

.preview-section-header {
    background: #0073aa;
    color: white;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    margin: -16px -16px 12px -16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #212529;
}

.preview-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
}

.preview-content ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #495057;
}

.preview-content ul li {
    margin: 4px 0;
}

.preview-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.preview-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #0073aa;
}

.preview-item strong {
    display: block;
    font-size: 13px;
    color: #212529;
    margin-bottom: 4px;
}

.preview-item small {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

/* Settings Info */
.settings-info {
    display: grid;
    gap: 16px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.setting-item label {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.setting-value {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
}

.setting-value.enabled {
    color: #28a745;
}

.setting-value.ready {
    color: #17a2b8;
}

/* Widget Actions */
.widget-actions {
    padding: 20px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.widget-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
}

.widget-actions .button-primary {
    background: #0073aa;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.widget-actions .button-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.widget-actions .button-secondary {
    background: white;
    color: #495057;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.widget-actions .button-secondary:hover {
    background: #f8f9fa;
    color: #212529;
    border-color: #ced4da;
    transform: translateY(-1px);
}

.widget-actions .button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.widget-actions .button.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: button-loading 1s linear infinite;
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .solution-template-widget {
        margin: 15px 0;
    }
    
    .widget-header {
        padding: 16px 20px;
    }
    
    .widget-title h3 {
        font-size: 16px;
    }
    
    .widget-title p {
        font-size: 12px;
    }
    
    .tab-content {
        padding: 16px;
    }
    
    .sections-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .section-card {
        padding: 16px;
    }
    
    .widget-actions {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    .widget-actions .button {
        width: 100%;
        justify-content: center;
    }
    
    .preview-frame.tablet,
    .preview-frame.mobile {
        max-width: 100%;
    }
    
    .preview-items {
        grid-template-columns: 1fr;
    }
    
    /* Editor widget responsive */
    .solution-template-widget-editor {
        margin: 8px 0;
    }
    
    .widget-editor-header {
        padding: 10px 16px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .widget-editor-header .widget-title {
        order: 1;
    }
    
    .widget-actions-header {
        order: 2;
        justify-content: center;
    }
    
    .widget-actions-header .button {
        font-size: 10px;
        padding: 5px 10px;
    }
    
    .widget-editor-content {
        max-height: 400px;
    }
    
    .testimonial-preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tab-nav {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: 1px solid #e1e5e9;
    }
    
    .tab-button:last-child {
        border-bottom: none;
    }
    
    .preview-controls {
        justify-content: center;
    }
}

/* Animations */
@keyframes button-loading {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content.active {
    animation: fadeIn 0.3s ease;
}

.section-card {
    animation: fadeIn 0.3s ease;
}

/* Success/Error states */
.widget-actions .button.success {
    background: #28a745 !important;
    color: white !important;
}

.widget-actions .button.error {
    background: #dc3545 !important;
    color: white !important;
}

/* Loading states */
.preview-device.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Hover effects */
.section-card.hero:hover .section-icon {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
}

.section-card.omni:hover .section-icon {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.section-card.ai-marketing:hover .section-icon {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

.section-card.benefits:hover .section-icon {
    background: linear-gradient(135deg, #fd7e14, #ffc107);
}

.section-card.testimonials:hover .section-icon {
    background: linear-gradient(135deg, #20c997, #17a2b8);
}

.section-card.cta:hover .section-icon {
    background: linear-gradient(135deg, #e83e8c, #dc3545);
}


/* Experience AI Agent Features Widget Styles */
.section-experience-ai-agent-features-optimized {
    padding: 60px 0;
    background: #f8f9fa;
}

.section-experience-ai-agent-features-optimized .section-title {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-experience-ai-agent-features-optimized .section-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Demo Tabs Styles */
.demo-tabs {
    margin-top: 3rem;
}

.demo-tabs .nav-tabs {
    border: none;
    background: #ffffff;
    border-radius: 15px;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.demo-tabs .nav-tabs .nav-item {
    margin: 0 5px;
}

.demo-tabs .nav-tabs .nav-link {
    border: none;
    border-radius: 12px;
    padding: 15px 25px;
    font-weight: 600;
    color: #6c757d;
    background: transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.demo-tabs .nav-tabs .nav-link:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.demo-tabs .nav-tabs .nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #007bff, #0056b3);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
    transform: translateY(-2px);
}

.demo-tabs .nav-tabs .nav-link i {
    margin-right: 8px;
    font-size: 1rem;
}

/* Tab Content */
.demo-tabs .tab-content {
    background: #ffffff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    min-height: 400px;
}

.demo-tabs .tab-pane {
    animation: fadeInUp 0.5s ease-in-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Demo Features Styles */
.demo-features h5 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.demo-features .chat-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.demo-features .box-left {
    flex: 1;
}

.demo-features .box-left ul {
    margin: 0;
    padding: 0;
}

.demo-features .box-left li {
    padding: 10px 0;
    font-size: 1rem;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

.demo-features .box-left li:last-child {
    border-bottom: none;
}

.demo-features .box-left .text-color-customizer {
    color: #28a745 !important;
}

/* Social Platforms Styles */
.demo-features .box-right {
    flex: 0 0 200px;
}

.demo-features .devvn_toolbar {
    background: #ffffff;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.demo-features .ul-toolbar {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.demo-features .ul-toolbar li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    font-weight: 500;
}

.demo-features .ul-toolbar li a:hover {
    background: #007bff;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.demo-features .ul-toolbar li .item {
    margin-right: 10px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
}

.demo-features .ul-toolbar li .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.demo-features .ul-toolbar li span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Animation Classes */
.animation_swing {
    animation: swing 2s ease-in-out infinite;
}

.animation_tada {
    animation: tada 2s ease-in-out infinite;
}

.animation_bounce {
    animation: bounce 2s ease-in-out infinite;
}

.animation_pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes swing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

@keyframes tada {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Chat Demo Styles */
.demo-chat {
    height: 100%;
}

.demo-chat .chat-container {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.demo-chat .card-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.demo-chat .card-header h6 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.demo-chat .card-header h6 i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.demo-chat .card-header small {
    font-size: 0.8rem;
    opacity: 0.9;
}

.demo-chat .card-body {
    flex: 1;
    padding: 20px;
    background: #f8f9fa;
    overflow-y: auto;
}

.demo-chat .message {
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: messageSlideIn 0.3s ease-out;
}

.demo-chat .bot-message {
    background: #ffffff !important;
    color: #495057 !important;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.demo-chat .user-message {
    align-self: flex-end;
    margin-left: auto !important;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.demo-chat .card-footer {
    padding: 15px 20px;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
}

.demo-chat .input-group input {
    border: 1px solid #e9ecef;
    border-radius: 25px 0 0 25px;
    padding: 12px 15px;
    font-size: 0.95rem;
}

.demo-chat .input-group button {
    border-radius: 0 25px 25px 0;
    padding: 12px 20px;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.demo-chat .input-group button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Video Styles */
.demo-tabs video {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 992px) {
    .demo-tabs .nav-tabs .nav-link {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .demo-features .chat-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .demo-features .box-right {
        flex: none;
    }
    
    .demo-features .ul-toolbar {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .section-experience-ai-agent-features-optimized {
        padding: 40px 0;
    }
    
    .demo-tabs .nav-tabs {
        flex-direction: column;
        padding: 5px;
    }
    
    .demo-tabs .nav-tabs .nav-item {
        margin: 2px 0;
    }
    
    .demo-tabs .nav-tabs .nav-link {
        font-size: 0.85rem;
        padding: 10px 15px;
        text-align: center;
    }
    
    .demo-tabs .tab-content {
        padding: 1.5rem;
    }
    
    .demo-features .ul-toolbar {
        grid-template-columns: repeat(2, 1fr);
        display: grid;
        gap: 10px;
    }
    
    .demo-features .ul-toolbar li a {
        padding: 10px;
        font-size: 0.8rem;
    }
    
    .demo-features .ul-toolbar li .item {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }
}