/* Global styles */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
  color: #333;
  background: #f8f9fa;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
#main-header {
  background-color: #000;
  color: #fff;
  padding: 1rem;
  border-bottom: 2px solid #333;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
  min-height: 100px;
}

.header-logo {
  height: 70px;
  width: auto;
  object-fit: contain;
}

.header-logo.left {
  margin-left: 1rem;
  height: 85px; /* Larger size for Golden Bricks logo */
}

.header-logo.right {
  margin-right: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #main-header {
        height: 80px;
        min-height: 80px;
        padding: 0.5rem;
    }

    .header-logo {
        height: 50px;
    }
    
    .header-logo.left {
        margin-left: 0.5rem;
        height: 65px; /* Larger size for Golden Bricks logo on mobile */
    }
    
    .header-logo.right {
        margin-right: 0.5rem;
    }
    
    #map {
        height: calc(100vh - 80px);
    }
}

/* Map */
#map {
  flex: 1;
  width: 100%;
  height: calc(100vh - 100px);
  border: none;
  background-color: #f0f0f0;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.modal-header h2, .modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-buttons button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

#login-submit-btn, #marker-submit-btn {
    background-color: #007bff;
    color: white;
}

#login-cancel-btn, #marker-cancel-btn {
    background-color: #6c757d;
    color: white;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.credentials-hint {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 1rem;
    font-size: 0.9rem;
}

/* User Controls Styles */
#user-controls-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: white;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.popup-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-badge {
    background-color: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

#login-btn, #logout-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

#logout-btn {
    background-color: #6c757d;
}

/* Notice Styles */
#notice-container {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 1000;
    width: auto;
    max-width: 400px;
}

.notice {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.guest-notice {
    background-color: #17a2b8;
}

.admin-notice {
    background-color: #28a745;
}

/* Marker Modal Specific Styles */
.media-input-section {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.youtube-input-container {
    display: flex;
    gap: 0.5rem;
}

#add-youtube-btn {
    padding: 0.5rem 1rem;
    background-color: #ff0000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#icon-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #007bff;
    object-fit: cover;
    margin-top: 10px;
}

#content-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.preview-item {
    position: relative;
}

.preview-item img {
    width: 100%;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
}

.preview-item .remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.helper-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Custom Map Marker Styles */
.custom-marker-icon {
    background: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    border: 3px solid #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

/* Popup Content Styles */
.popup-content {
    min-width: 300px;
    max-width: 400px;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.popup-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    font-weight: bold;
}

.popup-description {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.4;
}

.delete-marker-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
}

.delete-marker-btn:hover {
    background: #c82333;
}

/* Media Slider Styles */
.media-slider {
    margin: 15px 0;
}

.media-slider-container {
    position: relative;
    max-width: 100%;
    margin: 10px 0;
}

.media-item {
    display: none;
    width: 100%;
    text-align: center;
}

.media-item.active {
    display: block;
}

.media-item img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.media-item iframe {
    width: 100%;
    height: 200px;
    border: none;
    border-radius: 5px;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.slider-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
}

.slider-btn:hover {
    background: #0056b3;
}

.slider-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Image Preview Grid Styles */
.image-preview-item {
    position: relative;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.image-preview-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.image-preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.image-preview-remove:hover {
    background: #c82333;
}

.helper-text {
    font-size: 0.85rem;
    color: #666;
    margin: 5px 0;
}

.slider-counter {
    background: #f8f9fa;
    color: #333;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.google-maps-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #4285f4;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.google-maps-link:hover {
    background-color: #3367d6;
    color: white;
    transform: scale(1.1);
} 

/* SVG Marker Styles */
.svg-marker-icon {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.leaflet-marker-icon.svg-marker-icon {
    background: transparent !important;
    border: none !important;
}

/* Category selector styling */
#marker-category {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}

#custom-icon-group {
    transition: opacity 0.3s ease;
}

#custom-icon-group[style*="opacity: 0.6"] label {
    color: #666;
}

/* Custom Confirmation Dialog */
.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.confirm-dialog-overlay.show {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #e9ecef;
}

.confirm-dialog-overlay.show .confirm-dialog {
    transform: scale(1) translateY(0);
}

.confirm-dialog-icon {
    text-align: center;
    margin-bottom: 1.5rem;
}

.confirm-dialog-icon .icon {
    font-size: 3rem;
    color: #dc3545;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.confirm-dialog-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.confirm-dialog-message {
    text-align: center;
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.confirm-dialog-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-dialog-button {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    outline: none;
}

.confirm-dialog-button.cancel {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.confirm-dialog-button.cancel:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.confirm-dialog-button.delete {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.confirm-dialog-button.delete:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

.confirm-dialog-button:active {
    transform: translateY(0);
}

/* Enhanced Media Slider Styles */
.media-slider-wrapper {
    margin-top: 1rem;
    position: relative;
}

.media-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.media-slider-track {
    display: flex;
    transition: transform 0.3s ease;
    position: relative;
}

.media-slide {
    width: 100%;
    flex-shrink: 0;
    display: none;
    position: relative;
}

.media-slide.active {
    display: block;
}

.media-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

.media-slide iframe {
    border-radius: 12px;
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.slider-arrow:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 0;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.slider-dot:hover {
    background: #adb5bd;
    transform: scale(1.2);
}

.slider-dot.active {
    background: #007bff;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

.slider-dot.active::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    animation: ripple 1.5s infinite;
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .slider-prev {
        left: 5px;
    }
    
    .slider-next {
        right: 5px;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
    }
} 