/* Reef 2000 Dive Sites Map - WordPress Plugin Styles */

.reef2000-dive-map-container {
    max-width: 100%;
    margin: 20px 0;
    background: #f2f2f4;
    border-radius: 15px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.reef2000-header {
    background: linear-gradient(135deg, #9f2da1 0%, #056CF2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.reef2000-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="70" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="70" cy="80" r="2.5" fill="rgba(255,255,255,0.1)"/></svg>');
    pointer-events: none;
}

.reef2000-title {
    font-size: 2.2em;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.reef2000-subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    font-weight: 300;
    margin: 0;
    position: relative;
    z-index: 1;
}

.reef2000-map-wrapper {
    padding: 30px;
}

.reef2000-dive-map {
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 3px solid #9f2da1;
    position: relative;
    z-index: 1;
}

.reef2000-dive-sites-info {
    margin-top: 30px;
}

.reef2000-dive-sites-info h3 {
    color: #056CF2;
    font-size: 1.8em;
    margin: 0 0 20px 0;
    text-align: center;
    position: relative;
}

.reef2000-dive-sites-info h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #9f2da1, #056CF2);
    border-radius: 2px;
}

.reef2000-dive-sites-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.reef2000-dive-site-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.reef2000-dive-site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #9f2da1, #056CF2);
    transition: width 0.3s ease;
}

.reef2000-dive-site-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    border-color: #9f2da1;
}

.reef2000-dive-site-card:hover::before {
    width: 100%;
    opacity: 0.05;
}

.reef2000-dive-site-card.active {
    border-color: #9f2da1;
    background: linear-gradient(135deg, #f3e5f5 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(159, 45, 161, 0.2);
}

.reef2000-dive-site-name {
    font-size: 1.25em;
    font-weight: bold;
    color: #056CF2;
    margin: 0 0 10px 0;
}

.reef2000-dive-site-description {
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px 0;
    font-size: 0.95em;
}

.reef2000-dive-site-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reef2000-dive-detail {
    background: #f8a41f;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.reef2000-dive-detail.depth {
    background: blue;
}

.reef2000-dive-detail.type {
    background: green;
}

/* Custom marker styles */
.reef2000-custom-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

.reef2000-custom-marker {
    background: linear-gradient(135deg, #9f2da1, #ff1000);
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.reef2000-custom-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

/* Popup styles */
.leaflet-popup-content-wrapper {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2) !important;
    border: 2px solid #9f2da1 !important;
}

.leaflet-popup-tip {
    background: #9f2da1 !important;
    border: 2px solid #9f2da1 !important;
}

.reef2000-popup-title {
    font-size: 1.15em;
    font-weight: bold;
    color: #056CF2;
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #9f2da1;
}

.reef2000-popup-description {
    color: #666;
    line-height: 1.5;
    margin: 0 0 12px 0;
    font-size: 0.9em;
}

.reef2000-popup-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.reef2000-popup-detail {
    background: #f8a41f;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
}

.reef2000-popup-detail.depth {
    background: blue;
}

.reef2000-popup-detail.type {
    background: green;
}

/* Loading animation */
.reef2000-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    color: #056CF2;
    font-size: 1.1em;
}

.reef2000-loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid #9f2da1;
    border-top: 2px solid transparent;
    border-radius: 50%;
    margin-left: 10px;
    animation: reef2000-spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .reef2000-header {
        padding: 20px;
    }
    
    .reef2000-title {
        font-size: 1.8em;
    }
    
    .reef2000-subtitle {
        font-size: 1em;
    }
    
    .reef2000-map-wrapper {
        padding: 20px;
    }
    
    .reef2000-dive-sites-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .reef2000-dive-site-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .reef2000-header {
        padding: 15px;
    }
    
    .reef2000-title {
        font-size: 1.5em;
    }
    
    .reef2000-map-wrapper {
        padding: 15px;
    }
    
    .reef2000-dive-site-details {
        gap: 6px;
    }
    
    .reef2000-dive-detail {
        font-size: 0.75em;
        padding: 3px 8px;
    }
}

/* WordPress theme compatibility */
.reef2000-dive-map-container * {
    box-sizing: border-box;
}

.reef2000-dive-map-container h2,
.reef2000-dive-map-container h3 {
    line-height: 1.3;
}

.reef2000-dive-map-container p {
    margin: 0;
}

/* Ensure map displays correctly in WordPress themes */
.reef2000-dive-map .leaflet-container {
    font-family: inherit;
}

.reef2000-dive-map .leaflet-control-attribution {
    font-size: 10px;
}


/* Hover image styles */
.reef2000-hover-image {
    position: absolute;
    z-index: 10000;
    display: none;
    background: white;
    border: 3px solid #9f2da1;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    overflow: hidden;
    max-width: 300px;
    pointer-events: none;
}

.reef2000-hover-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.reef2000-hover-image-title {
    padding: 10px 15px;
    background: linear-gradient(135deg, #9f2da1, #056CF2);
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
}

/* Filter buttons styles */
.reef2000-filters {
    padding: 30px;
    text-align: center;
    background: #f2f2f4;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.reef2000-filter-btn {
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
    border: 2px solid #dee2e6;
    color: #495057;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.reef2000-filter-btn:hover {
    background: linear-gradient(135deg, #9f2da1, #056CF2);
    color: white;
    border-color: #9f2da1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(159, 45, 161, 0.3);
}

.reef2000-filter-btn.active {
    background: linear-gradient(135deg, #9f2da1, #056CF2);
    color: white;
    border-color: #9f2da1;
    box-shadow: 0 4px 12px rgba(159, 45, 161, 0.3);
}

.reef2000-filter-btn.active:hover {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .reef2000-filters {
        padding: 20px;
        gap: 8px;
    }
    
    .reef2000-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .reef2000-hover-image {
        max-width: 250px;
    }
    
    .reef2000-hover-image img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .reef2000-filters {
        padding: 15px;
        gap: 6px;
    }
    
    .reef2000-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .reef2000-hover-image {
        max-width: 200px;
    }
    
    .reef2000-hover-image img {
        height: 120px;
    }
}


/* Image Modal Styles */
.reef2000-image-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.reef2000-modal-content {
    position: relative;
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: reef2000-modal-appear 0.3s ease-out;
}

@keyframes reef2000-modal-appear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.reef2000-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.reef2000-modal-close:hover {
    background: rgba(159, 45, 161, 0.8);
    transform: scale(1.1);
}

.reef2000-modal-header {
    background: linear-gradient(135deg, #9f2da1, #056CF2);
    color: white;
    padding: 20px 30px;
    text-align: center;
}

.reef2000-modal-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: bold;
}

.reef2000-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.reef2000-image-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reef2000-main-image {
    text-align: center;
}

.reef2000-main-image img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.reef2000-main-image img:hover {
    transform: scale(1.02);
}

.reef2000-thumbnail-container {
    display: flex;
    justify-content: center;
}

.reef2000-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    overflow-x: auto;
    padding: 10px 0;
}

.reef2000-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.reef2000-thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
    border-color: #9f2da1;
}

.reef2000-thumbnail.active {
    opacity: 1;
    border-color: #9f2da1;
    box-shadow: 0 4px 12px rgba(159, 45, 161, 0.3);
}

/* Mobile responsive for modal */
@media (max-width: 768px) {
    .reef2000-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }
    
    .reef2000-modal-header {
        padding: 15px 20px;
    }
    
    .reef2000-modal-header h3 {
        font-size: 1.3em;
    }
    
    .reef2000-modal-body {
        padding: 15px;
        max-height: 60vh;
    }
    
    .reef2000-main-image img {
        max-height: 300px;
    }
    
    .reef2000-thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .reef2000-modal-close {
        top: 10px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .reef2000-modal-content {
        width: 98%;
        margin: 2% auto;
    }
    
    .reef2000-modal-header {
        padding: 12px 15px;
    }
    
    .reef2000-modal-header h3 {
        font-size: 1.2em;
    }
    
    .reef2000-modal-body {
        padding: 12px;
    }
    
    .reef2000-main-image img {
        max-height: 250px;
    }
    
    .reef2000-thumbnail {
        width: 50px;
        height: 38px;
    }
}

