﻿/*
 * Modern front-end styles for the Viaje Conosco plugin.
 * Clean design with custom color palette and minimal effects.
 */

/* Updated color palette to match user requirements */
:root {
  --vc-primary: #002a54;
  --vc-primary-dark: #002a54;
  --vc-accent-green: #85c095;
  --vc-accent-yellow: #85c095;
  --vc-white: #ffffff;
  --vc-text-light: #ffffff;
  --vc-text-dark: #002a54;
  --vc-text-muted: rgba(255, 255, 255, 0.85);
  --vc-border: rgba(0, 42, 84, 0.18);
  --vc-bg-light: #ffffff;
  --vc-radius-sm: 6px;
  --vc-radius-md: 8px;
  --vc-radius-lg: 12px;
  --vc-transition: all 0.15s ease;
}

.viaje-conosco-container {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  min-height: 600px;
  background: var(--vc-primary);
  overflow: hidden;
  font-family: inherit;
}

/* Sidebar Styles */
.vc-sidebar {
  width: 600px;
  min-width: 380px;
  background: transparent;
  color: var(--vc-text-light);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-sizing: border-box;
  overflow-y: auto;
}

.vc-sidebar select {
  max-width: none !important;
}

.vc-sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vc-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--vc-text-light);
  line-height: 1.2;
}

.vc-intro {
  margin: 0;
  color: var(--vc-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Form Styles */
.vc-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.vc-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vc-field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vc-text-light);
  letter-spacing: 0.01em;
}

/* Simplified select styles without heavy shadows */
.vc-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.vc-select-wrapper select {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border-radius: var(--vc-radius-md);
  border: 1px solid var(--vc-border);
  background: var(--vc-white);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--vc-text-dark);
  transition: var(--vc-transition);
  appearance: none;
  cursor: pointer;
}

.vc-select-wrapper select:hover {
  border-color: var(--vc-accent-green);
}

.vc-select-wrapper select:focus {
  outline: none;
  border-color: var(--vc-accent-green);
  box-shadow: 0 0 0 3px rgba(133, 192, 149, 0.2);
}

.vc-select-icon {
  position: absolute;
  right: 0.875rem;
  pointer-events: none;
  color: var(--vc-text-dark);
  opacity: 0.5;
  transition: var(--vc-transition);
}

.vc-select-wrapper:hover .vc-select-icon {
  opacity: 0.7;
}

.vc-section-title {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--vc-text-light);
  letter-spacing: 0.01em;
}

/* Clean custom checkbox without glow effects */
.vc-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--vc-text-muted);
  cursor: pointer;
  user-select: none;
  transition: var(--vc-transition);
  padding: 0.25rem 0;
}

.vc-checkbox:hover {
  color: var(--vc-text-light);
}

.vc-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.vc-checkbox-custom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: var(--vc-radius-sm);
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  transition: var(--vc-transition);
}

.vc-checkbox-icon {
  opacity: 0;
  transform: scale(0.5);
  transition: var(--vc-transition);
}

.vc-checkbox input[type="checkbox"]:checked + .vc-checkbox-custom {
  background: var(--vc-accent-green);
  border-color: var(--vc-accent-green);
}

.vc-checkbox input[type="checkbox"]:checked + .vc-checkbox-custom .vc-checkbox-icon {
  opacity: 1;
  transform: scale(1);
}

.vc-checkbox:hover .vc-checkbox-custom {
  border-color: rgba(255, 255, 255, 0.5);
}

.vc-checkbox-label {
  line-height: 1.4;
}

/* Simplified button with accent yellow color */
#vc-trace-route {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--vc-radius-md);
  background: var(--vc-accent-green);
  color: var(--vc-white);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: var(--vc-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#vc-trace-route:hover {
  box-shadow: 0 10px 30px rgba(0, 42, 84, 0.2);
  transform: translateY(-1px);
}

#vc-trace-route:active {
  transform: translateY(0);
}

#vc-trace-route svg {
  width: 20px;
  height: 20px;
}

/* Info Section */
.vc-info {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.vc-info-toggle {
  align-self: flex-start;
  padding: 0.5rem 0;
  border: none;
  background: none;
  color: var(--vc-text-light);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--vc-transition);
}

.vc-info-toggle:hover {
  color: var(--vc-accent-green);
}

.vc-info-toggle-icon {
  transition: transform 0.2s ease;
}

.vc-info-toggle[aria-expanded="true"] .vc-info-toggle-icon {
  transform: rotate(180deg);
}

.vc-info-content {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.vc-info-content.is-open {
  display: flex;
}

/* Map Panel */
.viaje-conosco-container .vc-map-panel {
  flex: 1;
  background: var(--vc-bg-light);
  display: flex;
  flex-direction: column;
  position: relative;
}

.viaje-conosco-container .vc-map {
  flex: 1;
  min-height: 600px;
  width: 100%;
}

.vc-summary {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(320px, calc(100% - 3rem));
  background: var(--vc-white);
  color: var(--vc-text-dark);
  border-radius: var(--vc-radius-md);
  border: 1px solid var(--vc-border);
  box-shadow: 0 18px 40px rgba(0, 42, 84, 0.18);
  padding: 1.25rem;
  z-index: 1001;
}

.vc-summary[hidden] {
  display: none !important;
}

.vc-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.vc-summary-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--vc-primary-dark);
}

.vc-summary-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 42, 84, 0.08);
  color: var(--vc-primary-dark);
  cursor: pointer;
  transition: var(--vc-transition);
}

.vc-summary-close:hover,
.vc-summary-close:focus-visible {
  background: rgba(0, 42, 84, 0.16);
  outline: none;
}

.vc-summary-body {
  max-height: 220px;
  overflow-y: auto;
}

.vc-summary-body table {
  width: 100%;
  border-collapse: collapse;
}

.vc-summary-body th,
.vc-summary-body td {
  text-align: left;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.9rem;
  color: var(--vc-text-dark);
}

.vc-summary-body th {
  font-weight: 600;
  color: var(--vc-primary-dark);
  background: rgba(0, 42, 84, 0.05);
}

.vc-summary-body tbody tr:last-child td {
  border-bottom: none;
}

.vc-summary-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--vc-primary-dark);
  font-size: 0.95rem;
}

.vc-summary-total {
  margin: 0;
}/* Popup styling */
.viaje-conosco-container .leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.viaje-conosco-container .leaflet-popup-content {
  margin: 0.75rem 1rem;
  line-height: 1.5;
  font-family: "Montserrat", Arial, sans-serif;
}

.viaje-conosco-container .im-popup {
  font-family: "Montserrat", Arial, sans-serif;
  padding: 0.75rem 0.5rem;
}

.viaje-conosco-container .im-popup-header {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.viaje-conosco-container .im-popup-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--vc-text-dark);
  margin-bottom: 0.25rem;
}

.viaje-conosco-container .im-popup-subtitle {
  font-size: 0.875rem;
  color: rgba(0, 42, 84, 0.65);
}

.viaje-conosco-container .im-popup-content {
  font-size: 0.875rem;
}

.viaje-conosco-container .im-popup-list {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0;
}


.viaje-conosco-container .im-popup-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
  font-size: 0.875rem;
}

.viaje-conosco-container .im-popup-list .im-popup-label {
  display: inline-block;
  font-size: 0.75rem;
  color: rgba(0, 42, 84, 0.65);
  line-height: 1.3;
  margin-right: 0.5rem;
}

.viaje-conosco-container .im-popup-list strong {
  font-size: 0.875rem;
  line-height: 1.3;
}

.viaje-conosco-container .im-popup-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.viaje-conosco-container .im-popup-check {
  color: var(--vc-accent-green);
  font-weight: 600;
}

.viaje-conosco-container .im-popup-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.viaje-conosco-container .im-popup-badge.warning {
  background-color: rgba(133, 192, 149, 0.15);
  color: var(--vc-primary-dark);
}

.viaje-conosco-container .im-popup-empty {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: rgba(0, 42, 84, 0.65);
}

.viaje-conosco-container .im-popup-text {
  font-weight: 600;
  font-size: 1rem;
  color: var(--vc-text-dark);
  margin-bottom: 0.25rem;
  margin-top: 0.25rem;
}

ul.im-popup-list li {
  font-size: 0.875rem;
}


/* Responsive Design */
@media (max-width: 1024px) {
  .viaje-conosco-container {
    flex-direction: column;
    min-height: auto;
  }

  .vc-map-panel {
    order: -1;
  }

  .vc-sidebar {
    width: 100%;
    min-width: unset;
    max-height: none;
    margin-top: 1.5rem;
  }

  .viaje-conosco-container .vc-map {
    min-height: 400px;
  }

  .vc-info {
    margin-top: 0;
    padding-top: 1.5rem;
  }
}

@media (max-width: 640px) {
  .viaje-conosco-container {
    border-radius: var(--vc-radius-md);
  }

  .vc-sidebar {
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }

  .vc-title {
    font-size: 1.75rem;
  }

  .vc-intro {
    font-size: 0.9rem;
  }

  .vc-field-label {
    font-size: 0.8rem;
  }

  .vc-select-wrapper select,
  .vc-input-wrapper input[type="number"] {
    font-size: 0.9rem;
    padding: 0.65rem 1rem;
  }

  .vc-select-wrapper select {
    padding-right: 2.5rem;
  }

  .viaje-conosco-container .vc-map {
    min-height: 350px;
  }
.vc-summary {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    width: auto;
    padding: 1rem;
  }

  .vc-summary-body {
    max-height: 200px;
  }

  .vc-summary-header h3 {
    font-size: 1rem;
  }

  .vc-summary-body th,
  .vc-summary-body td {
    font-size: 0.85rem;
  }

  #vc-trace-route {
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  .vc-sidebar {
    display: none;
  }

  .viaje-conosco-container .vc-map-panel {
    width: 100%;
  }
}
