/**
 * Frontend CSS for Fish Catch Block
 * Styles for lightbox, view toggles, and interactive elements
 */

.fish-catch-block .map-section .leaflet-container {
    height: 500px;
}


/* Consistent spacing fixes */

.fish-catch-block .location-section {
    margin-bottom: 24px !important;
}

.fish-catch-block .location-section h3 {
    margin: 0 0 16px 0 !important;
}

.fish-catch-block .location-section .location-links {
    margin: 0 !important;
    display: flex !important;
    justify-content: center;
    /* flex-wrap: wrap !important; */
    gap: 8px !important;
}

.fish-catch-block .map-section {
    margin-bottom: 24px !important;
}

.fish-catch-block .catches-section .catches-header {
    margin-bottom: 24px !important;
}


/* Simple button styling */

.fish-catch-block .location-section .location-links a {
    padding: 8px 12px !important;
    background-color: #007cba !important;
    color: white !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-size: 13px !important;
    transition: background-color 0.2s ease !important;
}

.fish-catch-block .location-section .location-links a:hover {
    background-color: #005a87 !important;
    transform: none !important;
}


/* Catches section styles */

.fish-catch-block .catches-section .catches-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

.fish-catch-block .catches-section .catches-header h3 {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: bold !important;
    color: #1e1e1e !important;
}


/* View toggle styles */

.fish-catch-block .view-toggle-container {
    display: flex !important;
    gap: 4px !important;
    background-color: #f0f0f0 !important;
    border-radius: 6px !important;
    padding: 2px !important;
}

.fish-catch-block .view-toggle-container .view-btn {
    padding: 6px 12px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.fish-catch-block .view-toggle-container .view-btn.active {
    background-color: #007cba !important;
    color: white !important;
}

.fish-catch-block .view-toggle-container .view-btn:not(.active) {
    background-color: transparent !important;
    color: #666 !important;
}


/* Catches grid */

.fish-catch-block .catches-grid {
    display: grid !important;
    gap: 16px !important;
}

.fish-catch-block .catches-grid.list-view {
    grid-template-columns: 1fr !important;
}

.fish-catch-block .catches-grid.grid-view {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
}


/* Catch card */

.fish-catch-block .catch-card {
    padding: 16px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}


/* List view content */

.fish-catch-block .list-view-content {
    gap: 12px !important;
    align-items: flex-start !important;
}

.fish-catch-block .list-view-content.show {
    display: flex !important;
}

.fish-catch-block .list-view-content.hide {
    display: none !important;
}


/* Grid view content */

.fish-catch-block .grid-view-content.show {
    display: block !important;
}

.fish-catch-block .grid-view-content.hide {
    display: none !important;
}


/* Media gallery */

.fish-catch-block .catch-media-gallery {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    background-color: transparent !important;
}

.fish-catch-block .catch-media-gallery-list {
    width: 60px !important;
    height: 60px !important;
}

.fish-catch-block .catch-media-gallery-grid {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px !important;
    margin-top: 12px !important;
}

.fish-catch-block .catch-media-gallery img,
.fish-catch-block .catch-media-gallery video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.fish-catch-block .catch-media-gallery img {
    transition: transform 0.2s ease !important;
}

.fish-catch-block .catch-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.fish-catch-block .catch-image-grid {
    transition: transform 0.2s ease !important;
}

.fish-catch-block .catch-image-list {
    transition: none !important;
}


/* Media overlay */

.fish-catch-block .catch-media-overlay {
    position: absolute !important;
    bottom: 2px !important;
    right: 2px !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    padding: 2px 4px !important;
    border-radius: 2px !important;
    font-size: 10px !important;
    font-weight: bold !important;
}

.fish-catch-block .catch-media-overlay-grid {
    bottom: 4px !important;
    right: 4px !important;
    font-size: 11px !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
}


/* Content styles */

.fish-catch-block .catch-content {
    flex: 1 !important;
    min-width: 0 !important;
}

.fish-catch-block .catch-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.fish-catch-block .catch-header.with-comments {
    margin-bottom: 4px !important;
}

.fish-catch-block .catch-header.no-comments {
    margin-bottom: 0 !important;
}

.fish-catch-block .catch-title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #1e1e1e !important;
}

.fish-catch-block .catch-measurements {
    font-size: 14px !important;
    color: #666 !important;
    font-weight: 500 !important;
}

.fish-catch-block .catch-comments {
    margin: 0 !important;
    font-size: 13px !important;
    color: #555 !important;
    font-style: italic !important;
    line-height: 1.3 !important;
}


/* Grid specific styles */

.fish-catch-block .grid-view-content .grid-header {
    margin-bottom: 12px !important;
}

.fish-catch-block .grid-view-content .catch-title {
    margin: 0 0 8px 0 !important;
}

.fish-catch-block .grid-view-content .catch-measurements {
    margin: 0 0 8px 0 !important;
}

.fish-catch-block .grid-view-content .catch-comments {
    line-height: 1.4 !important;
}


/* Gallery grid */

.fish-catch-block .gallery-grid {
    display: grid !important;
    gap: 8px !important;
    margin-top: 12px !important;
}

.fish-catch-block .gallery-item {
    position: relative !important;
    aspect-ratio: 1 !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    background-color: #f0f0f0 !important;
}


/* No media placeholder */

.fish-catch-block .no-media-placeholder {
    width: 100% !important;
    height: 120px !important;
    background-color: #e0e0e0 !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 12px !important;
}

.fish-catch-block .no-media-initials {
    font-size: 24px !important;
    font-weight: bold !important;
    color: #666 !important;
    margin-bottom: 4px !important;
}

.fish-catch-block .no-media-text {
    font-size: 12px !important;
    color: #999 !important;
}


/* No catches message */

.fish-catch-block .no-catches {
    text-align: center !important;
    padding: 40px 20px !important;
    color: #666 !important;
    font-style: italic !important;
}

.fish-catch-block .no-catches p {
    margin: 0 !important;
    font-size: 16px !important;
}


/* Compact media for list view */

.fish-catch-block .compact-media {
    flex-shrink: 0 !important;
}

.fish-catch-block .compact-media-placeholder {
    flex-shrink: 0 !important;
    background-color: #e0e0e0 !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    color: #999 !important;
    font-weight: bold !important;
}

.fish-catch-block .catch-media-placeholder-list {
    width: 60px !important;
    height: 60px !important;
    font-size: 18px !important;
}


/* Lightbox styles */

.fish-catch-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.fish-catch-lightbox .lightbox-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fish-catch-lightbox .lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.fish-catch-lightbox .lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.fish-catch-lightbox .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fish-catch-lightbox .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.fish-catch-lightbox .lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fish-catch-lightbox .lightbox-prev {
    left: -60px;
}

.fish-catch-lightbox .lightbox-next {
    right: -60px;
}

.fish-catch-lightbox .lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 15px;
}


/* View toggle styles */

.view-btn {
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.view-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.view-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.view-btn.active {
    background-color: #007cba !important;
    color: white !important;
    border-color: #007cba;
}

.view-btn:hover:not(.active) {
    background-color: #f0f0f0;
}


/* Grid view styles */

.catches-grid.grid-view {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
}

.catches-grid.list-view {
    grid-template-columns: 1fr !important;
}

.catches-grid .catch-card .list-view-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.catches-grid.grid-view .catch-card .list-view-content {
    display: none !important;
}

.catches-grid.list-view .catch-card .list-view-content {
    display: flex !important;
}

.catches-grid.grid-view .catch-card .grid-view-content {
    display: block !important;
}

.catches-grid.list-view .catch-card .grid-view-content {
    display: none !important;
}


/* Responsive lightbox */

@media (max-width: 768px) {
    .fish-catch-lightbox .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    .fish-catch-lightbox .lightbox-prev {
        left: -50px;
    }
    .fish-catch-lightbox .lightbox-next {
        right: -50px;
    }
    .fish-catch-lightbox .lightbox-close {
        top: -40px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .fish-catch-lightbox .lightbox-nav {
        position: fixed;
        top: auto;
        bottom: 20px;
        transform: none;
    }
    .fish-catch-lightbox .lightbox-prev {
        left: 20px;
    }
    .fish-catch-lightbox .lightbox-next {
        right: 20px;
    }
    .fish-catch-lightbox .lightbox-close {
        top: 20px;
        right: 20px;
    }
    .fish-catch-lightbox .lightbox-counter {
        bottom: 80px;
    }
}


/* Fish Catch Map Reveal Panel - Simple & Clean */

.fish-catch-reveal-panel {
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    border: 1px solid #ddd;
    transform: translateY(5px);
    opacity: 0;
    animation: slideUpPanel 0.2s ease forwards;
    min-height: 80px;
    overflow: hidden;
    position: relative;
}

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

.fish-catch-reveal-panel .panel-close {
    position: absolute;
    top: 4px;
    right: 4px;
    background: none;
    border: none;
    color: #999;
    font-size: 14px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.fish-catch-reveal-panel .panel-close:hover {
    color: #666;
}

.fish-catch-reveal-panel .panel-content {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 50px;
}

.fish-catch-reveal-panel .post-date {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
}

.fish-catch-reveal-panel .location-title {
    flex: 1;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fish-catch-reveal-panel .location-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fish-catch-reveal-panel .location-title a:hover {
    color: #007cba;
}

.fish-catch-reveal-panel .catch-count {
    background: #ff6b6b;
    color: white;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.fish-catch-reveal-panel .view-link {
    background: #007cba;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.fish-catch-reveal-panel .view-link:hover {
    background: #005a8b;
}