/* Offline Maps Styles */

/* Offline Controls */
.leaflet-control-offline {
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  padding: 5px;
}

.leaflet-control-offline button {
  width: 30px;
  height: 30px;
  background-color: white;
  border: none;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.leaflet-control-offline button:hover {
  background-color: #f0f0f0;
}

.leaflet-control-offline button:last-child {
  margin-bottom: 0;
}

.offline-toggle-btn.offline-active {
  background-color: #ffcc00;
  color: #333;
}

/* Download Progress */
.download-progress {
  background-color: white;
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
  width: 200px;
}

.download-progress .progress {
  height: 10px;
  margin-top: 5px;
  border-radius: 5px;
  overflow: hidden;
}

.download-progress .progress-bar {
  background-color: var(--primary-color);
  height: 100%;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 12px;
  margin-bottom: 5px;
}

/* Saved Areas Panel */
.saved-areas-panel {
  background-color: white;
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
  width: 250px;
  max-height: 300px;
  overflow-y: auto;
}

.saved-areas-panel h4 {
  font-size: 14px;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
}

.saved-area-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.saved-area-item:last-child {
  border-bottom: none;
}

.saved-area-info h5 {
  font-size: 14px;
  margin: 0 0 3px 0;
}

.saved-area-info p {
  font-size: 12px;
  color: #666;
  margin: 0;
}

.saved-area-actions {
  display: flex;
  gap: 5px;
}

.saved-area-actions button {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background-color: #f0f0f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.btn-view-area {
  color: var(--secondary-color);
}

.btn-delete-area {
  color: #dc3545;
}

/* Offline Status */
.offline-status {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.8rem;
  background-color: rgba(255, 255, 255, 0.2);
}

.offline-status.is-offline {
  background-color: rgba(255, 204, 0, 0.2);
}

.offline-status i {
  margin-right: 5px;
}

/* Notification */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px;
  border-radius: 5px;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 350px;
  animation: slideIn 0.3s ease-out;
}

.notification-content {
  display: flex;
  align-items: center;
}

.notification-content i {
  margin-right: 10px;
  font-size: 1.2rem;
}

.notification-close {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 10px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

.notification-info {
  border-left: 4px solid #17a2b8;
}

.notification-info i {
  color: #17a2b8;
}

.notification-success {
  border-left: 4px solid #28a745;
}

.notification-success i {
  color: #28a745;
}

.notification-warning {
  border-left: 4px solid #ffc107;
}

.notification-warning i {
  color: #ffc107;
}

.notification-error {
  border-left: 4px solid #dc3545;
}

.notification-error i {
  color: #dc3545;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile Styles */
@media (max-width: 767.98px) {
  .download-progress,
  .saved-areas-panel {
    width: 200px;
  }

  .notification {
    left: 20px;
    right: 20px;
    max-width: none;
  }
}
