/* ========================================
   STREAM PREVIEW MODAL STYLES
   Complete CSS file for stream preview functionality
   ======================================== */

/* Modal Overlay */
.preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.preview-modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Content */
.preview-modal-content {
    background: white;
    border-radius: 15px;
    width: 95%;
    max-width: 1000px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    color: #333;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { 
        transform: scale(0.9);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal Header */
.preview-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.preview-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.preview-close-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* Modal Body Layout */
.preview-modal-body {
    display: grid;
    grid-template-columns: 1fr 350px;
    min-height: 700px;
}

/* World Map Section */
.preview-world-map-section {
    position: relative;
    background: #e8f4fd;
    overflow: hidden;
}

.preview-world-map {
    width: 100%;
    height: 700px;
}

/* Connection Line */
.preview-connection-line {
    position: absolute;
    top: 55%;
    left: 50%;
    width: 2px;
    height: 90px;
    background: linear-gradient(to bottom, 
        rgba(231, 76, 60, 0.6) 0%, 
        rgba(231, 76, 60, 0.3) 50%, 
        transparent 100%);
    transform: translate(-50%, -45px);
    z-index: 999;
    animation: lineGlow 3s ease-in-out infinite;
}

@keyframes lineGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Pulsing Marker */
.preview-marker-pulse {
    position: absolute;
    top: 55%;
    left: 50%;
    width: 24px;
    height: 24px;
    background: #e74c3c;
    border-radius: 50%;
    animation: previewPulse 2s infinite;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.8);
    transform: translate(-50%, -50%);
}

.preview-marker-pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.4);
}

@keyframes previewPulse {
    0% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1; 
        box-shadow: 0 0 15px rgba(231, 76, 60, 0.8); 
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.3); 
        opacity: 0.7; 
        box-shadow: 0 0 25px rgba(231, 76, 60, 0.6); 
    }
    100% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1; 
        box-shadow: 0 0 15px rgba(231, 76, 60, 0.8); 
    }
}

/* Stream Popup */
.preview-stream-popup {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, 0);
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    width: 320px;
    z-index: 1001;
    border: 3px solid #e74c3c;
    max-height: 65%;
    overflow-y: auto;
    animation: popupSlideIn 0.6s ease-out 0.4s both;
}

/* Popup pointer/arrow pointing to marker */
.preview-stream-popup::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid #e74c3c;
    z-index: 1002;
}

.preview-stream-popup::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
    z-index: 1003;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
        scale: 0.9;
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
        scale: 1;
    }
}

/* Popup Video Section */
.preview-popup-video {
    width: 100%;
    height: 180px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    position: relative;
    border-radius: 10px 10px 0 0;
}

.preview-video-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-play-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

.preview-play-btn {
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.preview-play-btn:hover {
    background: rgba(0,0,0,0.8);
}

/* Popup Body */
.preview-popup-body {
    padding: 15px;
    font-family: Arial, sans-serif;
}

.preview-popup-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 12px;
    color: #2c3e50;
    line-height: 1.3;
}

/* Badges and Buttons */
.preview-status-badge {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
}

.preview-topic-badge {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
}

.preview-float-btn, .preview-vote-btn, .preview-info-btn {
    width: 100%;
    margin: 6px 0;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.preview-float-btn {
    background: linear-gradient(45deg, #17a2b8, #138496);
    color: white;
}

.preview-float-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(23, 162, 184, 0.4);
}

.preview-vote-btn {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
}

.preview-info-btn {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
}

/* Info Panel */
.preview-info-panel {
    background: #f8f9fa;
    padding: 25px;
    border-left: 4px solid #667eea;
    overflow-y: auto;
}

.preview-info-section {
    margin: 25px 0;
}

.preview-info-section:first-child {
    margin-top: 0;
}

.preview-info-section h3 {
    color: #667eea;
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.preview-info-section p {
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 14px;
}

.preview-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.preview-feature-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.preview-feature-list li::before {
    content: "✅";
    font-size: 14px;
    flex-shrink: 0;
}

/* Info Boxes */
.preview-tip-box {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 1px solid #90caf9;
    padding: 18px;
    border-radius: 10px;
    margin-top: 20px;
}

.preview-tip-box h4 {
    margin: 0 0 10px 0;
    color: #1976d2;
    font-size: 1rem;
    font-weight: 600;
}

.preview-tip-box p {
    margin: 0;
    font-size: 14px;
    color: #1565c0;
    line-height: 1.5;
}

.preview-location-box {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border: 1px solid #ffcc02;
    padding: 18px;
    border-radius: 10px;
    margin-top: 15px;
}

.preview-location-box h4 {
    margin: 0 0 10px 0;
    color: #f57f17;
    font-size: 1rem;
    font-weight: 600;
}

.preview-location-box p {
    margin: 0;
    font-size: 14px;
    color: #e65100;
    line-height: 1.5;
}

/* Preview Button */
.preview-stream-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin: 15px 10px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.preview-stream-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    background: linear-gradient(45deg, #ff5252, #ff3d00);
}

.preview-stream-btn:disabled {
    background: linear-gradient(45deg, #bbb, #999);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.preview-stream-btn:disabled:hover {
    transform: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Button Container */
.preview-button-container {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.preview-button-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 8px;
    font-style: italic;
}

/* Map Info Overlay */
.preview-map-info {
    pointer-events: none;
}

/* Custom Leaflet Marker */
.leaflet-custom-marker {
    background: transparent !important;
    border: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .preview-modal-content {
        width: 98%;
        max-height: 98vh;
        border-radius: 8px;
    }
    
    .preview-modal-header {
        padding: 15px;
        border-radius: 8px 8px 0 0;
    }
    
    .preview-modal-header h2 {
        font-size: 1.2rem;
    }
    
    .preview-modal-body {
        grid-template-columns: 1fr;
        min-height: 500px;
    }
    
    .preview-world-map {
        height: 400px;
    }
    
    .preview-stream-popup {
        position: static;
        transform: none;
        margin: 20px auto;
        width: 90%;
        max-width: 320px;
        border: 2px solid #e74c3c;
    }
    
    .preview-stream-popup::before,
    .preview-stream-popup::after {
        display: none;
    }
    
    .preview-connection-line {
        display: none;
    }
    
    .preview-marker-pulse {
        top: 40%;
        left: 50%;
    }
    
    .preview-info-panel {
        padding: 20px;
        border-left: none;
        border-top: 4px solid #667eea;
    }
    
    .preview-stream-btn {
        padding: 12px 24px;
        font-size: 14px;
        margin: 15px 5px;
    }
}

@media (max-width: 480px) {
    .preview-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .preview-modal-header {
        border-radius: 0;
    }
    
    .preview-stream-popup {
        width: 95%;
    }
    
    .preview-info-panel {
        padding: 15px;
    }
}