/* css/map-page.css */
/* VerdaLink Tam Ekran Harita Sayfası İçin Özel Stiller */

/* Harita Sayfası Layout Stilleri */
body.map-page {
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

body.map-page .wrapper {
  height: 100%;
  display: flex;
  flex-direction: row;
}

body.map-page .iq-sidebar {
  flex-shrink: 0;
  height: 100vh;
}

body.map-page #content-page {
  margin: 0;
  padding: 0;
  height: calc(100vh - var(--navbar-height));
  margin-top: var(--navbar-height);
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

body.sidebar-main #content-page {
  margin-left: var(--sidebar-width-collapsed);
  width: calc(100% - var(--sidebar-width-collapsed));
}

body.map-page .container-fluid {
  padding: 0 !important;
  flex-grow: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

body.map-page .row.no-gutters {
  flex-grow: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

body.map-page .row.no-gutters>.col-12 {
  flex-grow: 1;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Harita Container Stilleri */
.full-page-map {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: #e5e7eb;
  min-height: 200px;
}

.full-page-map .map-loading-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-secondary, #6b7280);
  font-weight: 500;
  z-index: 1;
  display: flex;
  align-items: center;
}

body.map-page .iq-footer {
  display: none !important;
}

/* Harita Legend Stilleri */
.map-legend {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 12px 16px;
  border-radius: var(--card-border-radius, 8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-size: 0.75rem;
  max-width: 220px;
  min-width: 200px;
  transition: all 0.3s ease-in-out;
  border: 1px solid rgba(0, 0, 0, 0.1);
  animation: fadeInLeft 0.5s ease-out;
}

.map-legend:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.map-legend h6 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-family: var(--font-family-headings, 'Montserrat', sans-serif);
  border-bottom: 2px solid var(--primary-green, #009245);
  padding-bottom: 6px;
  color: var(--text-primary, #1f2937);
  font-weight: 600;
  text-align: center;
}

.map-legend .legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
  user-select: none;
  position: relative;
}

.map-legend .legend-item:last-child {
  margin-bottom: 0;
}

.map-legend .legend-item:hover {
  background-color: rgba(0, 146, 69, 0.1);
  color: var(--primary-green, #009245);
  transform: translateX(2px);
}

.map-legend .legend-item:active {
  transform: translateX(2px) scale(0.98);
}

.map-legend .legend-item[style*="opacity: 0.3"] {
  background-color: rgba(200, 200, 200, 0.1);
  color: #999;
}

.map-legend .legend-item[style*="opacity: 0.3"]:hover {
  background-color: rgba(220, 220, 220, 0.2);
  color: #666;
}

.map-legend .legend-icon-img {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  flex-shrink: 0;
  object-fit: contain;
  transition: transform 0.2s ease-in-out;
}

.map-legend .legend-item:hover .legend-icon-img {
  transform: scale(1.1);
}

.map-legend .legend-item[style*="opacity: 0.3"] .legend-icon-img {
  filter: grayscale(70%) opacity(0.7);
}

.map-legend .legend-item span {
  font-weight: 500;
  font-size: 0.8rem;
  line-height: 1.2;
}

.map-legend .legend-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--primary-green, #009245);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.map-legend .legend-item:hover::before {
  opacity: 1;
}

.map-legend .legend-item[style*="opacity: 0.3"]::before {
  background-color: #ccc;
}

/* Rota Yönetimi Paneli Stilleri */
.route-management-panel {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 300px;
  z-index: 1000;
  transition: all 0.3s ease-in-out;
  border: 1px solid rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.5s ease-out;
}

.route-management-panel:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.route-management-panel h6 {
  color: #333;
  font-weight: 600;
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  text-align: center;
  font-family: var(--font-family-headings, 'Montserrat', sans-serif);
  border-bottom: 2px solid var(--primary-green, #009245);
  padding-bottom: 6px;
}

.route-management-panel .form-group {
  margin-bottom: 12px;
}

.route-management-panel .form-control {
  border-radius: 6px;
  border: 1px solid #ddd;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.route-management-panel .form-control:focus {
  border-color: var(--primary-green, #009245);
  box-shadow: 0 0 0 2px rgba(0, 146, 69, 0.2);
}

.route-management-panel .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  padding: 0.5rem 0.8rem;
  white-space: nowrap;
  min-width: 0;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.route-management-panel .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.route-management-panel .btn:active {
  transform: translateY(0);
}

.route-management-panel .btn i {
  font-size: 14px;
  flex-shrink: 0;
}

/* Rota Kaydetme Kontrolleri Stilleri */
#route-save-controls {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  min-width: 300px;
  max-width: 350px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.3s ease-out;
}

#route-save-controls h6 {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  color: #333;
  font-weight: 600;
  text-align: center;
  font-family: var(--font-family-headings, 'Montserrat', sans-serif);
  border-bottom: 2px solid var(--primary-green, #009245);
  padding-bottom: 6px;
}

#route-save-controls .form-group {
  margin-bottom: 8px;
}

#route-save-controls .form-control {
  border-radius: 6px;
  border: 1px solid #ddd;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#route-save-controls .form-control:focus {
  border-color: var(--primary-green, #009245);
  box-shadow: 0 0 0 2px rgba(0, 146, 69, 0.2);
}

#route-save-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

#route-save-controls button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#route-save-controls button:active:not(:disabled) {
  transform: translateY(0);
}

#route-save-controls button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

#route-save-controls button i {
  font-size: 16px;
}

#route-save-controls .d-flex {
  gap: 8px;
}

#route-save-controls .flex-grow-1 {
  flex: 1;
}

/* Loading ve Error States */
.map-loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-secondary);
  font-weight: 500;
}

.map-error-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-danger);
  font-weight: 500;
  text-align: center;
  padding: 20px;
}

.map-error-placeholder i {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* Google Maps UI Enhancements */
.gm-style .gm-style-iw-d {
  overflow: hidden !important;
}

.gm-style .gm-style-iw-c {
  padding: 0 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.gm-style .gm-style-iw-tc::after {
  background: white !important;
}

/* Responsive Düzenlemeler */
@media (max-width: 768px) {
  .map-legend {
    top: 10px;
    left: 10px;
    max-width: 180px;
    min-width: 160px;
    padding: 10px 12px;
  }

  .map-legend h6 {
    font-size: 0.85rem;
    margin-bottom: 10px;
  }

  .map-legend .legend-item {
    margin-bottom: 6px;
    padding: 3px 4px;
  }

  .map-legend .legend-icon-img {
    width: 16px;
    height: 16px;
    margin-right: 6px;
  }

  .map-legend .legend-item span {
    font-size: 0.75rem;
  }

  .route-management-panel {
    width: calc(100% - 40px);
    max-width: 300px;
    bottom: 15px;
    left: 20px;
    right: 20px;
    padding: 12px;
  }

  .route-management-panel h6 {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }

  .route-management-panel .btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
  }

  #route-save-controls {
    width: calc(100% - 40px);
    max-width: 320px;
    left: 20px;
    right: 20px;
    transform: none;
    padding: 12px;
  }

  #route-save-controls h6 {
    font-size: 0.9rem;
  }

  #route-save-controls .d-flex {
    flex-direction: column;
    gap: 8px;
  }

  #route-save-controls button {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .map-legend {
    max-width: 150px;
    min-width: 140px;
    padding: 8px 10px;
  }

  .map-legend h6 {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  .map-legend .legend-item {
    margin-bottom: 5px;
    padding: 2px 3px;
  }

  .map-legend .legend-icon-img {
    width: 14px;
    height: 14px;
    margin-right: 5px;
  }

  .map-legend .legend-item span {
    font-size: 0.7rem;
  }

  .route-management-panel {
    padding: 10px;
  }

  #route-save-controls {
    padding: 10px;
  }
}

/* Daha kompakt legend için */
.compact-legend-item {
  padding: 2px 6px !important;
  margin-bottom: 2px !important;
  font-size: 12px !important;
  min-height: 24px !important;
  line-height: 1.2 !important;
  display: flex;
  align-items: center;
  gap: 4px;
}

.compact-legend-item .legend-icon-img {
  width: 16px !important;
  height: 16px !important;
  margin-right: 4px !important;
}

.compact-legend-item span {
  font-size: 12px !important;
  padding: 0 !important;
}