/**
 * StrixBox for Google Maps Reviews - Color Themes
 * Theme-specific styles and slider layouts
 */

/* ===== COLOR THEMES ===== */

/* Blue Theme (Default) */
.strix-widget.strix-color-blue {
    --strix-primary: #000000 ;
    --strix-primary-dark: #1976D2;
    --strix-primary-light: #BBDEFB;
}

/* Green Theme */
.strix-widget.strix-color-green {
    --strix-primary: #4CAF50;
    --strix-primary-dark: #388E3C;
    --strix-primary-light: #C8E6C9;
}

/* Red Theme */
.strix-widget.strix-color-red {
    --strix-primary: #F44336;
    --strix-primary-dark: #D32F2F;
    --strix-primary-light: #FFCDD2;
}

/* Purple Theme */
.strix-widget.strix-color-purple {
    --strix-primary: #9C27B0;
    --strix-primary-dark: #7B1FA2;
    --strix-primary-light: #E1BEE7;
}

/* Custom Theme - uses CSS variables set by PHP */
.strix-widget.strix-color-custom {
    /* Variables will be set inline by PHP */
}

/* ===== HORIZONTAL SLIDER STYLES ===== */

.strix-horizontal-slider .strix-slider-wrapper {
    position: relative;
    overflow: hidden;
}

.strix-horizontal-slider .strix-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.strix-horizontal-slider .strix-slider-slides {
    display: flex;
    transition: transform 0.4s ease-in-out;
    height: 100%;
}

.strix-horizontal-slider .strix-slide {
    flex: 0 0 100%;
    padding: 1rem;
    height: 100%;
}

/* Navigation Arrows */
.strix-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--strix-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--strix-transition);
    z-index: 2;
    box-shadow: var(--strix-shadow);
}

.strix-slider-arrow:hover {
    background: white;
    box-shadow: var(--strix-shadow-hover);
    transform: translateY(-50%) scale(1.1);
}

.strix-slider-prev {
    left: 10px;
}

.strix-slider-next {
    right: 10px;
}

.strix-arrow-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--strix-primary);
}

/* Slider Indicators */
.strix-slider-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--strix-background-light);
}

.strix-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--strix-border);
    cursor: pointer;
    transition: var(--strix-transition);
}

.strix-indicator.active,
.strix-indicator:hover {
    background: var(--strix-primary);
    transform: scale(1.2);
}

/* Slider Controls */
.strix-slider-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--strix-background-light);
    border-top: 1px solid var(--strix-border-light);
}

.strix-slider-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--strix-text-muted);
    font-size: 0.85rem;
}

.strix-current-slide {
    font-weight: 600;
    color: var(--strix-primary);
}

.strix-slider-actions {
    display: flex;
    gap: 0.5rem;
}

.strix-slider-action {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: var(--strix-radius-small);
    transition: var(--strix-transition);
}

.strix-slider-action:hover {
    background: var(--strix-border-light);
}

/* ===== VERTICAL SLIDER STYLES ===== */

.strix-vertical-slider .strix-reviews-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

.strix-vertical-slider .strix-review-item {
    margin-bottom: 1rem;
    animation: strix-slide-in 0.4s ease-out;
}

.strix-vertical-slider .strix-review-item:nth-child(even) .strix-review-card {
    background: var(--strix-background-light);
}

/* Read More Button */
.strix-read-more-btn {
    background: none;
    border: none;
    color: var(--strix-primary);
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0;
    text-decoration: underline;
}

.strix-read-more-btn:hover {
    color: var(--strix-primary-dark);
}

/* Review Actions */
.strix-review-actions {
    display: flex;
    gap: 1rem;
}

.strix-review-action {
    background: none;
    border: none;
    color: var(--strix-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--strix-radius-small);
    transition: var(--strix-transition);
}

.strix-review-action:hover {
    background: var(--strix-border-light);
    color: var(--strix-primary);
}

/* Load More Button */
.strix-load-more-container {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid var(--strix-border-light);
}

.strix-load-more-btn {
    background: var(--strix-background-light);
    border: 1px solid var(--strix-border);
    color: var(--strix-text);
    padding: 0.75rem 1.5rem;
    border-radius: var(--strix-radius);
    cursor: pointer;
    transition: var(--strix-transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.strix-load-more-btn:hover {
    background: var(--strix-border-light);
    border-color: var(--strix-primary);
}

/* Scroll to Top Button */
.strix-scroll-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--strix-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--strix-shadow);
    transition: var(--strix-transition);
    z-index: 1000;
}

.strix-scroll-top-btn:hover {
    background: var(--strix-primary-dark);
    transform: translateY(-2px);
}

/* ===== GRID SLIDER STYLES ===== */

.strix-grid-slider .strix-grid-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--strix-background-light);
    border-bottom: 1px solid var(--strix-border-light);
    flex-wrap: wrap;
    gap: 1rem;
}

.strix-grid-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.strix-filter-btn {
    background: var(--strix-background);
    border: 1px solid var(--strix-border);
    color: var(--strix-text);
    padding: 0.5rem 1rem;
    border-radius: var(--strix-radius-small);
    cursor: pointer;
    transition: var(--strix-transition);
    font-size: 0.85rem;
}

.strix-filter-btn:hover,
.strix-filter-btn.active {
    background: var(--strix-primary);
    color: white;
    border-color: var(--strix-primary);
}

.strix-grid-view-options {
    display: flex;
    gap: 0.25rem;
}

.strix-view-btn {
    background: var(--strix-background);
    border: 1px solid var(--strix-border);
    color: var(--strix-text-muted);
    padding: 0.5rem;
    border-radius: var(--strix-radius-small);
    cursor: pointer;
    transition: var(--strix-transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.strix-view-btn:hover,
.strix-view-btn.active {
    background: var(--strix-primary);
    color: white;
    border-color: var(--strix-primary);
}

/* Grid Layout */
.strix-reviews-grid {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.strix-reviews-grid.strix-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.strix-reviews-grid.strix-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.strix-reviews-grid.strix-list {
    grid-template-columns: 1fr;
}

.strix-grid-item {
    animation: strix-fade-in 0.5s ease-out;
}

.strix-grid-item.strix-hidden {
    display: none;
}

/* Grid Card Styles */
.strix-grid-slider .strix-review-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.strix-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.strix-card-content {
    flex: 1;
    margin-bottom: 1rem;
}

.strix-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--strix-border-light);
    margin-top: auto;
}

.strix-card-actions {
    display: flex;
    gap: 0.5rem;
}

.strix-card-action {
    background: none;
    border: none;
    color: var(--strix-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--strix-radius-small);
    transition: var(--strix-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.strix-card-action:hover {
    background: var(--strix-border-light);
    color: var(--strix-primary);
}

.strix-expand-btn {
    background: none;
    border: none;
    color: var(--strix-primary);
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    padding: 0;
    text-decoration: underline;
}

.strix-expand-btn:hover {
    color: var(--strix-primary-dark);
}

/* Grid Pagination */
.strix-grid-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--strix-background-light);
    border-top: 1px solid var(--strix-border-light);
}

.strix-pagination-btn {
    background: var(--strix-background);
    border: 1px solid var(--strix-border);
    color: var(--strix-text);
    padding: 0.5rem 1rem;
    border-radius: var(--strix-radius-small);
    cursor: pointer;
    transition: var(--strix-transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.strix-pagination-btn:hover:not(:disabled) {
    background: var(--strix-primary);
    color: white;
    border-color: var(--strix-primary);
}

.strix-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.strix-pagination-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--strix-text-muted);
    font-size: 0.9rem;
}

.strix-page-current {
    font-weight: 600;
    color: var(--strix-primary);
}

/* ===== POPUP STYLES ===== */

.strix-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.strix-popup-container {
    background: var(--strix-background);
    border-radius: var(--strix-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    animation: strix-popup-appear 0.3s ease-out;
}

@keyframes strix-popup-appear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.strix-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--strix-border-light);
    background: var(--strix-background-light);
}

.strix-popup-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--strix-text);
    margin: 0;
}

.strix-popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--strix-text-muted);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--strix-radius-small);
    transition: var(--strix-transition);
}

.strix-popup-close:hover {
    background: var(--strix-border-light);
    color: var(--strix-text);
}

.strix-popup-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.strix-popup-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--strix-border-light);
    background: var(--strix-background-light);
    text-align: center;
}

.strix-powered-by {
    color: var(--strix-text-muted);
    font-size: 0.8rem;
}

.strix-powered-by a {
    color: var(--strix-primary);
    text-decoration: none;
}

.strix-powered-by a:hover {
    text-decoration: underline;
}

/* Popup Form Styles */
.strix-search-form {
    margin-bottom: 2rem;
}

.strix-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.strix-form-group.strix-form-group-inline {
    margin-bottom: 1rem;
}

.strix-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--strix-text);
}

.strix-form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--strix-border);
    border-radius: var(--strix-radius-small);
    font-size: 1rem;
    transition: var(--strix-transition);
    padding-right: 3rem;
}

.strix-form-input:focus {
    outline: none;
    border-color: var(--strix-primary);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.strix-input-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--strix-text-muted);
    pointer-events: none;
}

.strix-form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--strix-border);
    border-radius: var(--strix-radius-small);
    font-size: 1rem;
    background: var(--strix-background);
    cursor: pointer;
}

.strix-form-actions {
    text-align: center;
}

/* Search Examples */
.strix-search-examples {
    margin-top: 1.5rem;
}

.strix-examples-title {
    font-size: 0.9rem;
    color: var(--strix-text-muted);
    margin-bottom: 0.75rem;
}

.strix-examples-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.strix-example-btn {
    background: var(--strix-background-light);
    border: 1px solid var(--strix-border);
    color: var(--strix-text);
    padding: 0.5rem 0.75rem;
    border-radius: var(--strix-radius-small);
    cursor: pointer;
    transition: var(--strix-transition);
    font-size: 0.8rem;
}

.strix-example-btn:hover {
    background: var(--strix-primary);
    color: white;
    border-color: var(--strix-primary);
}

/* Loading Animation in Popup */
.strix-loading-animation {
    text-align: center;
    margin-bottom: 2rem;
}

.strix-loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.strix-loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--strix-primary);
    border-radius: 50%;
    animation: strix-bounce 1.4s ease-in-out infinite both;
}

.strix-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.strix-loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes strix-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.strix-loading-progress {
    margin-top: 1rem;
}

.strix-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--strix-border-light);
    border-radius: 2px;
    overflow: hidden;
}

.strix-progress-fill {
    height: 100%;
    background: var(--strix-primary);
    border-radius: 2px;
    animation: strix-progress 2s ease-in-out infinite;
}

@keyframes strix-progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.strix-progress-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--strix-text-muted);
    margin-top: 0.5rem;
}

/* Responsive Popup */
@media (max-width: 768px) {
    .strix-popup-container {
        margin: 1rem;
        max-width: none;
    }
    
    .strix-popup-header,
    .strix-popup-body,
    .strix-popup-footer {
        padding: 1rem;
    }
    
    .strix-examples-list {
        flex-direction: column;
    }
    
    .strix-example-btn {
        text-align: left;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --strix-text: #ffffff;
        --strix-text-light: #cccccc;
        --strix-text-muted: #999999;
        --strix-background: #ffffff;
        --strix-background-light: #ffffff;
        --strix-border: #404040;
        --strix-border-light: #333333;
    }
    
    .strix-slider-arrow {
        background: rgba(42, 42, 42, 0.9);
        border-color: var(--strix-border);
    }
    
    .strix-slider-arrow:hover {
        background: var(--strix-background-light);
    }
}