/**
 * Bricks Builder Integration Styles
 * Expresso Extra Product
 */

/* Bricks Builder Element Container */
.eep-bricks-element {
    width: 100%;
    box-sizing: border-box;
}

/* Builder Preview Styles */
.eep-builder-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    text-align: center;
    color: #6c757d;
    min-height: 120px;
}

.eep-builder-notice i {
    font-size: 32px;
    margin-bottom: 12px;
    color: #007cba;
}

.eep-builder-notice p {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.eep-builder-notice small {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Bricks Editor Enhancements */
.brx-body .eep-product-extras {
    position: relative;
    margin: 20px 0;
}

/* Shortcode Wrapper */
.eep-shortcode-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.eep-bricks-integration {
    /* Bricks-specific integration styles */
}

/* AJAX Loading States */
.eep-ajax-placeholder {
    position: relative;
    min-height: 100px;
}

.eep-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.eep-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: eep-spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes eep-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.eep-loading-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.eep-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
    border-radius: 4px;
    text-align: center;
}

/* Responsive Styles for Bricks */
.eep-bricks-element .eep-product-extras {
    width: 100%;
}

/* Animation Classes */
.eep-animation-fadeIn {
    animation: eepFadeIn 0.5s ease-in-out;
}

@keyframes eepFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.eep-animation-slideDown {
    animation: eepSlideDown 0.5s ease-out;
}

@keyframes eepSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eep-animation-slideUp {
    animation: eepSlideUp 0.5s ease-out;
}

@keyframes eepSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eep-animation-zoomIn {
    animation: eepZoomIn 0.5s ease-out;
}

@keyframes eepZoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Theme Variations */
.eep-theme-modern .eep-product-extras {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.eep-theme-minimal .eep-product-extras {
    background: transparent;
    border: none;
    padding: 20px 0;
}

.eep-theme-minimal .eep-extras-title {
    font-weight: 300;
    color: #333;
}

.eep-theme-classic .eep-product-extras {
    background: #fafafa;
    border: 2px solid #ddd;
    padding: 25px;
}

/* Layout Specific Styles */
.eep-layout-cards .eep-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.eep-layout-grid .eep-options-grid {
    display: grid;
    gap: 12px;
}

.eep-layout-pills .eep-options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Column Responsive Classes */
.eep-columns-1 .eep-options-grid { grid-template-columns: 1fr; }
.eep-columns-2 .eep-options-grid { grid-template-columns: repeat(2, 1fr); }
.eep-columns-3 .eep-options-grid { grid-template-columns: repeat(3, 1fr); }
.eep-columns-4 .eep-options-grid { grid-template-columns: repeat(4, 1fr); }
.eep-columns-5 .eep-options-grid { grid-template-columns: repeat(5, 1fr); }
.eep-columns-6 .eep-options-grid { grid-template-columns: repeat(6, 1fr); }

/* Mobile Responsive */
@media (max-width: 768px) {
    .eep-columns-2 .eep-options-grid { grid-template-columns: 1fr; }
    .eep-columns-3 .eep-options-grid { grid-template-columns: repeat(2, 1fr); }
    .eep-columns-4 .eep-options-grid { grid-template-columns: repeat(2, 1fr); }
    .eep-columns-5 .eep-options-grid { grid-template-columns: repeat(2, 1fr); }
    .eep-columns-6 .eep-options-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .eep-columns-3 .eep-options-grid,
    .eep-columns-4 .eep-options-grid,
    .eep-columns-5 .eep-options-grid,
    .eep-columns-6 .eep-options-grid {
        grid-template-columns: 1fr;
    }
    
    .eep-bricks-element .eep-product-extras {
        padding: 15px;
    }
}

/* Bricks Editor Context Styles */
body.brx-body .eep-product-extras {
    outline: none !important;
}

/* Integration with Bricks Responsive Controls */
.brx-body .eep-bricks-element {
    display: block;
    width: 100%;
}

/* Debug Mode Styles */
.eep-debug {
    padding: 10px 15px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    margin: 10px 0;
}

/* Loading state improvements */
.eep-ajax-placeholder .eep-loading {
    min-height: 80px;
}

/* Ensure proper spacing in Bricks context */
.brx-body .eep-product-extras .eep-extras-title {
    margin-top: 0;
    margin-bottom: 20px;
}