/**
 * Property Videos Styles
 * Styles for video upload section (agent portal) and video player (property details)
 */

/* ==========================================================================
   Video Upload Section (Agent Portal)
   ========================================================================== */

.video-upload-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.video-upload-section h4 {
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #212529;
}

.video-upload-section h4 i {
    color: #0d6efd;
    margin-right: 0.5rem;
}

/* Property Search */
.property-search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.property-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    font-size: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.property-search-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.15);
    outline: none;
}

.property-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.property-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.property-search-results.show {
    display: block;
}

.property-search-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
}

.property-search-item:last-child {
    border-bottom: none;
}

.property-search-item:hover {
    background-color: #f8f9fa;
}

.property-search-item.selected {
    background-color: #e7f1ff;
}

.selected-property {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #e7f1ff 0%, #f0f7ff 100%);
    border: 2px solid #0d6efd;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.selected-property-address {
    font-weight: 500;
    color: #0d6efd;
}

.selected-property-clear {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.1rem;
}

.selected-property-clear:hover {
    color: #dc3545;
}

/* Upload Dropzone */
.video-dropzone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: #fafbfc;
}

.video-dropzone:hover {
    border-color: #0d6efd;
    background: #f8f9ff;
}

.video-dropzone.dragover {
    border-color: #0d6efd;
    background: #e7f1ff;
    transform: scale(1.01);
}

.video-dropzone.uploading {
    cursor: default;
    border-style: solid;
    border-color: #0d6efd;
}

.video-dropzone.disabled {
    cursor: not-allowed;
    background: #f8f9fa;
    border-color: #dee2e6;
}

.video-dropzone.disabled:hover {
    border-color: #dee2e6;
    background: #f8f9fa;
    transform: none;
}

/* Show/hide content based on disabled state */
.video-dropzone .dropzone-disabled-message {
    display: none;
}

.video-dropzone .dropzone-active-content {
    display: block;
}

.video-dropzone.disabled .dropzone-disabled-message {
    display: block;
}

.video-dropzone.disabled .dropzone-active-content {
    display: none;
}

.dropzone-disabled-message .dropzone-icon {
    color: #adb5bd;
}

.dropzone-disabled-message .dropzone-text {
    color: #6c757d;
}

.dropzone-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.video-dropzone.dragover .dropzone-icon {
    color: #0d6efd;
}

.dropzone-text {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.dropzone-subtext {
    font-size: 0.875rem;
    color: #6c757d;
}

.dropzone-browse {
    color: #0d6efd;
    text-decoration: underline;
    cursor: pointer;
}

.dropzone-note {
    background: rgba(30, 58, 95, 0.08);
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    display: inline-block;
}

.dropzone-note i {
    color: #0d6efd;
}

/* Upload Progress */
.upload-progress-container {
    margin-top: 1.5rem;
    display: none;
}

.upload-progress-container.show {
    display: block;
}

.upload-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.upload-file-name {
    font-weight: 500;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-file-name i {
    color: #0d6efd;
}

.upload-file-size {
    color: #6c757d;
    font-size: 0.875rem;
}

.upload-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #0a58ca);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.upload-progress-fill.processing {
    background: linear-gradient(90deg, #198754, #20c997);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.upload-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #6c757d;
}

.upload-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-status-icon {
    width: 16px;
    height: 16px;
}

.upload-status.success {
    color: #198754;
}

.upload-status.error {
    color: #dc3545;
}

.upload-cancel-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.upload-cancel-btn:hover {
    text-decoration: underline;
}

/* Visibility Options */
.visibility-options {
    margin: 1.5rem 0;
}

.visibility-options label {
    font-weight: 500;
    margin-bottom: 0.75rem;
    display: block;
    color: #212529;
}

.visibility-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.visibility-option {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.visibility-option:hover {
    border-color: #adb5bd;
    background: #f8f9fa;
}

.visibility-option.selected {
    border-color: #0d6efd;
    background: #f8f9ff;
}

.visibility-option input[type="radio"] {
    margin-right: 0.75rem;
    margin-top: 0.2rem;
}

.visibility-option-content {
    flex: 1;
    pointer-events: none;
}

.visibility-option-content * {
    pointer-events: none;
}

.visibility-option-title {
    font-weight: 500;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.visibility-option-title i {
    font-size: 0.9rem;
}

.visibility-option-desc {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Client Email Input (for private visibility) */
.private-client-input {
    margin-top: 0.75rem;
    padding-left: 1.5rem;
    display: none;
}

.private-client-input.show {
    display: block;
}

.private-client-input input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Video Title/Description */
.video-metadata-fields {
    margin: 1.5rem 0;
}

.video-metadata-fields .form-group {
    margin-bottom: 1rem;
}

.video-metadata-fields label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
}

.video-metadata-fields input,
.video-metadata-fields textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.video-metadata-fields input:focus,
.video-metadata-fields textarea:focus {
    border-color: #0d6efd;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

/* Agent's Video List */
.agent-videos-list {
    margin-top: 2rem;
}

.agent-videos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.agent-videos-header h5 {
    margin: 0;
    font-weight: 600;
}

.video-list-empty {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.video-list-empty i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.video-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.video-card:hover {
    background: #f0f0f0;
}

.video-card.clickable {
    cursor: pointer;
}

.video-card.clickable:hover {
    background: #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-card.clickable:hover .video-play-overlay {
    opacity: 1;
}

.video-thumbnail {
    width: 120px;
    height: 68px;
    background: #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    font-size: 1.5rem;
}

.video-duration-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-play-overlay i {
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.video-card-content {
    flex: 1;
    min-width: 0;
}

.video-card-title {
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-card-property {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.video-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.video-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.video-card-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

/* Share copied tooltip */
.share-copied-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #198754;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    margin-bottom: 4px;
    animation: tooltipFadeIn 0.2s ease;
    z-index: 100;
}

.share-copied-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #198754;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Video Status Badges */
.video-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.video-status-badge.uploading {
    background: #fff3cd;
    color: #856404;
}

.video-status-badge.processing {
    background: #cce5ff;
    color: #004085;
}

.video-status-badge.ready {
    background: #d4edda;
    color: #155724;
}

.video-status-badge.failed {
    background: #f8d7da;
    color: #721c24;
}

/* Visibility badges */
.visibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.visibility-badge.private {
    background: #e2e3e5;
    color: #383d41;
}

.visibility-badge.clients {
    background: #d1ecf1;
    color: #0c5460;
}

.visibility-badge.public {
    background: #d4edda;
    color: #155724;
}


/* ==========================================================================
   Video Player (Property Details) - Professional Gallery Style
   ========================================================================== */

.property-videos-section {
    margin: -12px -12px 12px -12px;
    padding-top: 0;
    background: white;
    overflow: hidden;
}

/* Reduce top padding from image-section when video is present */
.image-section:has(.property-videos-section) {
    padding-top: 4px;
}

.video-section-header {
    padding: 0.4rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.property-videos-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.property-videos-section h3 i {
    color: #0d6efd;
    flex-shrink: 0;
}

.video-count-badge {
    font-weight: 400;
    color: #6c757d;
    font-size: 0.95em;
}

/* Video Gallery Container */
.video-gallery-container {
    position: relative;
}

/* Main Video Container with Navigation */
.video-main-container {
    position: relative;
    background: #000;
}

.video-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-player-container iframe,
.video-player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    gap: 0.5rem;
    width: 100%;
    height: 100%;
    min-height: 200px;
}

.video-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

/* Video Counter */
.video-counter {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Navigation Buttons */
.video-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0;
}

.video-main-container:hover .video-nav-btn {
    opacity: 1;
}

.video-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.video-nav-btn.disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
}

.video-nav-prev {
    left: 12px;
}

.video-nav-next {
    right: 12px;
}

/* Fullscreen Button */
.video-fullscreen-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0;
}

.video-main-container:hover .video-fullscreen-btn {
    opacity: 1;
}

.video-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Video Info Bar */
.video-info-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.video-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.video-agent-attribution {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.video-agent-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.video-agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-agent-name {
    font-weight: 500;
    font-size: 0.85rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-details {
    padding-top: 0.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.video-title {
    font-size: 0.8rem;
    color: #495057;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-view-count {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.video-stats-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Video Voting */
.video-voting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vote-btn:hover {
    background: #e9ecef;
}

.vote-btn.vote-up:hover,
.vote-btn.vote-up.active {
    background: #d4edda;
    border-color: #28a745;
    color: #28a745;
}

.vote-btn.vote-down:hover,
.vote-btn.vote-down.active {
    background: #f8d7da;
    border-color: #dc3545;
    color: #dc3545;
}

.vote-btn i {
    font-size: 0.85rem;
}

.vote-btn span {
    font-weight: 500;
}

/* Visibility Benefits */
.visibility-benefits {
    font-size: 0.75rem;
    color: #059669;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.visibility-benefits strong {
    font-weight: 600;
}

/* Badge Progression Display */
.badge-progression {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.badge-progression .badge-sm {
    font-size: 0.6rem;
    padding: 0.2em 0.5em;
    font-weight: 600;
    border-radius: 4px;
}

/* Premium Badge Gradient Styles */
.bg-gradient-rainbow {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
}

.bg-gradient-gold {
    background: linear-gradient(135deg, #f5af19 0%, #f12711 50%, #ffd700 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bg-gradient-platinum {
    background: linear-gradient(135deg, #e8e8e8 0%, #a8a8a8 50%, #d4d4d4 100%);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Badge shimmer animation for premium badges */
.bg-gradient-rainbow,
.bg-gradient-gold,
.bg-gradient-platinum {
    position: relative;
    overflow: hidden;
}

.bg-gradient-rainbow::after,
.bg-gradient-gold::after,
.bg-gradient-platinum::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: badgeShimmer 3s infinite;
}

@keyframes badgeShimmer {
    0% { left: -100%; }
    50%, 100% { left: 150%; }
}

/* Mobile adjustments for badge progression */
@media (max-width: 576px) {
    .badge-progression {
        margin-top: 0.5rem;
    }
    
    .badge-progression .badge-sm {
        font-size: 0.55rem;
        padding: 0.15em 0.4em;
    }
}

/* Video Own Note */
.video-own-note {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    color: #0369a1;
}

/* Thumbnail Strip */
.video-thumbnail-strip {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 0.5rem;
    gap: 0.5rem;
}

.thumb-scroll-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 1px solid #dee2e6;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.thumb-scroll-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.video-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    flex: 1;
    padding: 4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.video-thumbnails::-webkit-scrollbar {
    display: none;
}

.video-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: #1a1a1a;
}

.video-thumbnail:hover {
    border-color: #adb5bd;
}

.video-thumbnail.active {
    border-color: #0d6efd;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1rem;
}

.video-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-thumbnail:hover .video-thumbnail-overlay {
    opacity: 1;
}

.video-thumbnail.active .video-thumbnail-overlay {
    opacity: 1;
    background: rgba(30, 58, 95, 0.4);
}

.video-thumbnail-duration {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 2px;
}

/* ==========================================================================
   Video Lightbox Modal
   ========================================================================== */

.video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.video-lightbox.open {
    display: flex;
}

.video-lightbox-content {
    width: 100%;
    max-width: 1200px;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
}

.video-lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    color: white;
}

.video-lightbox-counter {
    font-size: 1rem;
    font-weight: 500;
}

.video-lightbox-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.video-lightbox-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
}

.video-lightbox-player {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-lightbox-player iframe,
.video-lightbox-player video {
    width: 100%;
    height: 100%;
    border: none;
}

.video-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.video-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.video-lightbox-prev {
    left: 20px;
}

.video-lightbox-next {
    right: 20px;
}

.video-lightbox-info {
    text-align: center;
    padding: 1rem;
    color: white;
}

.video-lightbox-agent {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.video-lightbox-title {
    font-size: 1rem;
    font-weight: 500;
}

.video-lightbox-thumbnails {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 1rem;
    overflow-x: auto;
    max-width: 90vw;
}

.video-lightbox-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 52px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: #333;
}

.video-lightbox-thumb:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.video-lightbox-thumb.active {
    border-color: #0d6efd;
}

.video-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-lightbox-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9rem;
}

/* No Videos State */
.no-videos-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.no-videos-message i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-videos-message p {
    margin: 0;
    font-size: 0.95rem;
}

/* ==========================================================================
   Video Gallery Responsive Design
   ========================================================================== */

/* Mobile - always show nav buttons */
@media (max-width: 767px) {
    .video-section-header {
        padding: 0.75rem 1rem;
    }
    
    .property-videos-section h3 {
        font-size: 0.95rem;
    }
    
    .video-nav-btn {
        opacity: 1;
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    
    .video-fullscreen-btn {
        opacity: 1;
    }
    
    .video-info-bar {
        padding: 0.5rem 0.75rem;
        gap: 0.375rem;
    }
    
    .video-info-row {
        gap: 0.5rem;
    }
    
    .video-agent-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }
    
    .video-agent-name {
        font-size: 0.8rem;
    }
    
    .video-view-count {
        font-size: 0.75rem;
    }
    
    .video-stats-row {
        gap: 0.5rem;
    }
    
    .vote-btn {
        padding: 0.25rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .vote-btn i {
        font-size: 0.75rem;
    }
    
    .video-title {
        font-size: 0.75rem;
    }
    
    .video-thumbnail {
        width: 70px;
        height: 52px;
    }
    
    .thumb-scroll-btn {
        display: none;
    }
    
    .video-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .video-lightbox-prev {
        left: 10px;
    }
    
    .video-lightbox-next {
        right: 10px;
    }
    
    .video-lightbox-thumb {
        width: 60px;
        height: 45px;
    }
}

/* Tablet */
@media (min-width: 768px) {
    .video-section-header {
        padding: 1.25rem 1.5rem;
    }
    
    .video-info-bar {
        padding: 0.75rem 1.25rem;
    }
    
    .video-agent-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .video-agent-name {
        font-size: 0.9rem;
    }
    
    .video-thumbnail {
        width: 100px;
        height: 75px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .video-thumbnail {
        width: 110px;
        height: 82px;
    }
}

/* ==========================================================================
   Upload Section Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .video-upload-section {
        padding: 1rem;
    }

    /* Ensure search results fit within mobile viewport */
    .property-search-input {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    .property-search-results {
        max-height: 50vh;
        width: 100%;
    }
    
    .property-search-item {
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
    }
    
    .property-search-item .search-item-main {
        white-space: normal;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .property-search-item .badge {
        font-size: 0.6rem !important;
        flex-shrink: 0;
        margin-left: 0.25rem;
    }

    .video-dropzone {
        padding: 1.5rem 1rem;
    }

    .dropzone-icon {
        font-size: 2rem;
    }

    .dropzone-text {
        font-size: 1rem;
    }

    .video-card {
        flex-direction: column;
    }

    .video-card-actions {
        flex-direction: row;
        justify-content: flex-end;
    }

    .visibility-radio-group {
        gap: 0.5rem;
    }

    .visibility-option {
        padding: 0.625rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .upload-file-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}


/* ==========================================================================
   Upload Queue Styles
   ========================================================================== */

.upload-queue-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.upload-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.upload-queue-header span {
    font-weight: 500;
    color: #495057;
}

.upload-queue-header i {
    margin-right: 0.5rem;
    color: #0d6efd;
}

.upload-queue-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.upload-queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.upload-queue-item.queue-item-uploading {
    border-color: #0d6efd;
    background: #f0f7ff;
}

.upload-queue-item.queue-item-processing {
    border-color: #17a2b8;
    background: #e8f7fa;
}

.upload-queue-item.queue-item-complete {
    border-color: #28a745;
    background: #e8f5e9;
}

.upload-queue-item.queue-item-error {
    border-color: #dc3545;
    background: #ffeef0;
}

.queue-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.queue-item-icon {
    flex-shrink: 0;
}

.queue-item-name {
    font-size: 0.875rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.queue-item-size {
    font-size: 0.75rem;
    color: #6c757d;
    flex-shrink: 0;
}

.queue-item-remove {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.queue-item-remove:hover {
    color: #dc3545;
}

.queue-item-error {
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.upload-queue-progress-header {
    margin-bottom: 0.5rem;
}

/* Queue responsive */
@media (max-width: 576px) {
    .upload-queue-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .queue-item-name {
        max-width: 120px;
    }
    
    .upload-queue-item {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
}


/* ==========================================================================
   Video Summary Stats (Agent Portal)
   ========================================================================== */

.video-summary-stats {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    min-width: 100px;
    flex: 1;
}

.summary-stat .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d6efd;
    line-height: 1.2;
}

.summary-stat .stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* ==========================================================================
   Property Video Groups (Agent Portal)
   ========================================================================== */

.property-video-group {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.property-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.property-group-header:hover {
    background: #e9ecef;
}

.property-group-header.expanded {
    border-bottom: 1px solid #e9ecef;
}

.property-group-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.property-group-info .property-icon {
    color: #0d6efd;
    flex-shrink: 0;
}

.property-group-info .property-address {
    font-weight: 500;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-group-info .property-video-count {
    font-size: 0.8rem;
    color: #6c757d;
    flex-shrink: 0;
}

.property-group-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.property-group-meta .property-views {
    font-size: 0.8rem;
    color: #6c757d;
}

.property-group-meta .property-views i {
    margin-right: 0.25rem;
}

.property-group-meta .expand-icon {
    color: #6c757d;
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.property-group-videos {
    padding: 0.5rem;
}

.property-group-videos .video-card {
    margin-bottom: 0.5rem;
    border: 1px solid #f0f0f0;
}

.property-group-videos .video-card:last-child {
    margin-bottom: 0;
}

/* Remove property address from cards inside groups (already shown in header) */
.property-group-videos .video-card-property {
    display: none;
}

/* ==========================================================================
   Search Video Indicator
   ========================================================================== */

.property-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.property-search-item .search-item-main {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.property-search-item.has-videos {
    background: linear-gradient(90deg, transparent 0%, rgba(40, 167, 69, 0.05) 100%);
}

.search-video-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.search-video-indicator i {
    font-size: 0.65rem;
}

/* ==========================================================================
   Summary Stats and Property Groups Responsive
   ========================================================================== */

@media (max-width: 576px) {
    .video-summary-stats {
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .summary-stat {
        padding: 0.5rem 0.75rem;
        min-width: 80px;
    }
    
    .summary-stat .stat-number {
        font-size: 1.25rem;
    }
    
    .summary-stat .stat-label {
        font-size: 0.65rem;
    }
    
    .property-group-header {
        padding: 0.75rem;
    }
    
    .property-group-info .property-address {
        font-size: 0.9rem;
    }
    
    .property-group-info .property-video-count {
        font-size: 0.75rem;
    }
    
    .property-group-meta .property-views {
        display: none;
    }
    
    .search-video-indicator {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
}

/* ============================================
   Visibility Change Modal
   ============================================ */

.visibility-modal-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: 9999;
    animation: fadeIn 0.2s ease;
}

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

.visibility-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    animation: slideUp 0.2s ease;
}

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

.visibility-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.visibility-modal-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.visibility-modal-body {
    padding: 1rem 1.25rem;
}

.visibility-modal-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.visibility-modal-option {
    display: block;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
}

.visibility-modal-option:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.visibility-modal-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.visibility-modal-option input {
    display: none;
}

.visibility-modal-option-content {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.visibility-modal-option-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f3f4f6;
    flex-shrink: 0;
}

.visibility-modal-option-icon i {
    font-size: 1rem;
}

.visibility-modal-option.selected .visibility-modal-option-icon {
    background: white;
}

.visibility-modal-option-text {
    flex: 1;
}

.visibility-modal-option-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    display: flex;
    align-items: center;
}

.visibility-modal-option-desc {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

.visibility-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
}

/* Mobile adjustments for modal */
@media (max-width: 480px) {
    .visibility-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .visibility-modal-option {
        padding: 0.75rem;
    }
    
    .visibility-modal-option-icon {
        width: 32px;
        height: 32px;
    }
}

/* ============================================
   Video Tour Badge - Results Page
   ============================================ */

.video-tour-badge {
    background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
    color: white !important;
    padding: 4px 12px !important;
    border-radius: 5px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    margin-left: 8px;
    display: inline-flex;
    align-items: center !important;
    gap: 5px !important;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3) !important;
    border: none !important;
    outline: none !important;
}

.video-tour-badge i {
    font-size: 0.75rem !important;
    color: white !important;
}

/* Video tour filter section styling */
#videoTourFilterSection {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(99, 102, 241, 0.04));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem !important;
    margin-bottom: 0.75rem;
}

#videoTourFilterSection .form-check {
    margin: 0;
}

#videoTourFilterSection .form-check-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4c1d95;
    cursor: pointer;
    display: flex;
    align-items: center;
}

#videoTourFilterSection .form-check-input {
    cursor: pointer;
}

#videoTourFilterSection .form-check-input:checked {
    background-color: #8b5cf6;
    border-color: #8b5cf6;
}

#videoTourFilterSection.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.1));
    border-color: #8b5cf6;
}

/* Purple text color for video icon in filter */
.text-purple {
    color: #8b5cf6 !important;
}

/* Mobile adjustments for video badge */
@media (max-width: 576px) {
    .video-tour-badge {
        padding: 2px 8px !important;
        font-size: 0.65rem !important;
    }
    
    .video-tour-badge i {
        font-size: 0.6rem !important;
    }
}

/* ============================================
   Restricted Videos Message
   ============================================ */

.restricted-videos-message {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f4ff 0%, #f0e6ff 100%);
    border: 1px solid #e0d4f5;
    border-radius: 12px;
    margin-top: 1rem;
}

.restricted-videos-message .restricted-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.restricted-videos-message .restricted-icon i {
    font-size: 1.5rem;
    color: white;
}

.restricted-videos-message .restricted-content {
    flex: 1;
}

.restricted-videos-message .restricted-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4c1d95;
}

.restricted-videos-message .restricted-content p {
    margin: 0 0 0.5rem 0;
    color: #5b21b6;
    font-size: 0.9rem;
}

.restricted-videos-message .restricted-actions {
    margin-top: 1rem;
}

.restricted-videos-message .request-access-btn {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border: none;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}

.restricted-videos-message .request-access-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.restricted-videos-message .request-access-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.restricted-videos-message .restricted-note {
    margin: 0.75rem 0 0 0;
    color: #6d28d9;
    font-size: 0.85rem;
}

.restricted-videos-message .request-success {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    color: #059669;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.restricted-videos-message .request-success i {
    color: #10b981;
    font-size: 1.1rem;
}

/* ============================================
   Video Access Requests (Agent Portal)
   ============================================ */

.video-access-requests-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.video-access-requests-section h4 {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.access-requests-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.access-request-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f4ff;
    border: 1px solid #e0d4f5;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.access-request-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.1);
}

.access-request-card .request-info {
    flex: 1;
}

.access-request-card .request-email {
    font-weight: 500;
    color: #4c1d95;
    margin-bottom: 0.25rem;
}

.access-request-card .request-property {
    font-size: 0.9rem;
    color: #5b21b6;
    margin-bottom: 0.25rem;
}

.access-request-card .request-time {
    font-size: 0.8rem;
}

.access-request-card .request-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
}

/* Mobile adjustments for access requests */
@media (max-width: 576px) {
    .access-request-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .access-request-card .request-actions {
        justify-content: flex-end;
    }
}

/* Mobile adjustments for restricted message */
@media (max-width: 576px) {
    .restricted-videos-message {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .restricted-videos-message .restricted-icon {
        width: 50px;
        height: 50px;
    }
    
    .restricted-videos-message .restricted-icon i {
        font-size: 1.25rem;
    }
    
    .restricted-videos-message .restricted-content h4 {
        font-size: 1rem;
    }
}
