/* Planner visual refresh inspired by Discover.
   Presentation only: no DOM, content, drag/drop or interaction changes. */

.trip-planning-container {
  background: #f5f7fa;
  color: #172238;
}

.column {
  background: #fff;
  border: 1px solid rgba(222, 230, 239, 0.9);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(24, 46, 78, 0.07);
  padding: 18px;
}

.column-header {
  color: #172238;
  font-size: 1.08rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 13px;
}

.column .fa-plus {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f2f7fc;
  border: 1px solid #e1eaf3;
  color: #168fe9;
  font-size: 14px;
}

.activity-card {
  background: #fff;
  color: #26344a;
  border: 1px solid #e8edf3;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(24, 46, 78, 0.075);
  padding: 10px;
  margin: 12px 0;
  gap: 11px;
}

.activity-thumb {
  width: 68px;
  min-width: 68px;
  height: 68px;
  border-radius: 15px;
  background: #edf2f7;
  margin-top: 0;
}

.activity-thumb img {
  border-radius: inherit;
}

.activity-info {
  min-width: 0;
  width: 100%;
}

.activity-info h3 {
  margin: 1px 0 0;
  color: #26344a;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 750;
}

.activity-address {
  margin: 4px 0 0;
  color: #7b8798;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 400;
}

.activity-meta {
  gap: 6px;
  margin-top: 7px;
  font-size: 11px;
  opacity: 1;
  color: #66758a;
  flex-wrap: wrap;
}

.activity-meta .activity-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f4f7fb;
  border: 1px solid #e8eef5;
}

.activity-meta .activity-chip i {
  color: #168fe9;
  font-size: 10px;
}

.activity-actions button {
  color: #53657a;
}

.activity-actions button:hover {
  background: #f2f7fc;
}

.sortable-fallback {
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(24, 46, 78, 0.18);
}

@media (max-width: 480px) {
  .activity-thumb {
    width: 60px;
    min-width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .activity-info h3 {
    font-size: 13.5px;
  }
}


/* Compact Planner toolbar: same controls and handlers, new visual hierarchy. */
#trip-planning .trip-header {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 9px;
  border: 1px solid #e5ebf2;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(24, 46, 78, 0.07);
}

#trip-planning .trip-header button {
  min-height: 40px;
  margin: 0;
  padding: 9px 13px;
  border-radius: 13px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  box-shadow: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

#trip-planning #newPlanning {
  border: 1px solid #e0e9f2;
  background: #f4f8fc;
  color: #33445d !important;
}

#trip-planning #newPlanning:active,
#trip-planning #publishItineraryButton:active {
  transform: scale(0.98);
}

#trip-planning #publishItineraryButton {
  min-height: 40px;
  padding: 9px 14px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #16aefc, #087cf1);
  box-shadow: 0 8px 20px rgba(8, 124, 241, 0.18);
}

#trip-planning #publishItineraryButton.is-published {
  color: #69778c;
  background: #eff2f5;
  box-shadow: none;
}

#trip-planning #tab-list,
#trip-planning #tab-map,
#trip-planning #magicMap,
#trip-planning #shareButton {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 !important;
  border: 1px solid #e0e9f2;
  border-radius: 13px;
  background: #f8fafc;
  color: #758398;
  font-size: 16px !important;
  cursor: pointer;
}

#trip-planning #tab-list[aria-selected="true"],
#trip-planning #tab-map[aria-selected="true"] {
  border-color: rgba(8, 124, 241, 0.16);
  background: #eef7ff;
  color: #087cf1;
}

#trip-planning #shareButton[style*="display: none"] {
  display: none !important;
}

/* The map surface now belongs to the same card family as the itinerary. */
#trip-planning .map-container {
  overflow: hidden;
  border: 1px solid #e5ebf2;
  border-radius: 22px;
  background: #edf2f7;
  box-shadow: 0 8px 24px rgba(24, 46, 78, 0.07);
}

@media (max-width: 520px) {
  #trip-planning .trip-header {
    justify-content: flex-start;
    gap: 7px;
    padding: 8px;
    border-radius: 18px;
  }

  #trip-planning #newPlanning,
  #trip-planning #publishItineraryButton {
    flex: 1 1 auto;
  }

  #trip-planning .trip-header button {
    font-size: 12.5px;
  }

  #trip-planning #tab-list,
  #trip-planning #tab-map,
  #trip-planning #magicMap,
  #trip-planning #shareButton {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}


/* Shared modal family refresh.
   Visual-only overrides: preserve modal sizing, transforms, handlers and DOM. */
.modal1,
.modal5 {
  background: rgba(8, 18, 33, 0.50);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.modal-content1.modal-system,
.modal-content3.modal-system,
.modal-content4.modal-system {
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  border: 1px solid rgba(226, 233, 241, 0.94);
  border-bottom: 0;
  background: #fff;
  box-shadow: 0 -16px 48px rgba(18, 39, 67, 0.16);
}

.modal-system {
  --ms-primary: #087cf1;
  --ms-primary-dark: #056ed8;
  --ms-border: #e3eaf2;
  --ms-text: #172238;
  --ms-text-light: #66758a;
  --ms-text-lighter: #94a0b0;
  --ms-neutral-light: #f4f7fa;
  --ms-radius: 14px;
  --ms-radius-lg: 20px;
}

.modal-system .ms-title,
.modal-system .ms-subtitle {
  color: #172238;
  letter-spacing: -0.02em;
}

.modal-system .ms-title {
  font-size: 21px;
}

.modal-system .ms-subtitle {
  font-size: 17px;
  font-weight: 700;
}

.modal-system .ms-text {
  color: #66758a;
  font-size: 16px;
  line-height: 1.48;
}

.modal-system .ms-input,
.modal-system .ms-textarea,
.modal-system .ms-select {
  border: 1px solid #e3eaf2;
  border-radius: 14px;
  background: #f8fafc;
  color: #26344a;
  padding: 13px 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.modal-system .ms-input:focus,
.modal-system .ms-textarea:focus,
.modal-system .ms-select:focus {
  border-color: rgba(8, 124, 241, 0.42);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 124, 241, 0.09);
}

.modal-system .ms-actions {
  gap: 10px;
}

.modal-system .ms-button {
  min-height: 46px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
}

.modal-system .ms-button-primary {
  background: linear-gradient(135deg, #16aefc, #087cf1);
  box-shadow: 0 8px 20px rgba(8, 124, 241, 0.16);
}

.modal-system .ms-button-secondary {
  border: 1px solid #e1e8f0;
  background: #f4f7fa;
  color: #53657a;
}

.modal-system .ms-button-danger {
  background: #fff1f1;
  color: #d14343;
  border: 1px solid #f4dada;
}

.modal-system .ms-button-danger:hover {
  background: #ffe7e7;
  color: #bd3030;
  box-shadow: none;
}

.modal-system .ms-button-icon {
  border: 1px solid #e1e8f0;
  background: #f5f8fb;
  color: #53657a;
  box-shadow: 0 4px 12px rgba(24, 46, 78, 0.06);
}

.modal-system .cancelOnboarding {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 6px 18px rgba(8, 18, 33, 0.16);
}

/* Complete shared modal coverage for the remaining legacy modal variants.
   Presentation only: no dimensions, open/close behavior, handlers or DOM changed. */
.modal,
.modal2 {
  background: rgba(8, 18, 33, 0.50);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.modal-content,
.modal-content2 {
  border: 1px solid rgba(226, 233, 241, 0.94);
  background: #fff;
  color: #172238;
  font-family: var(--font-family);
  box-shadow: 0 18px 48px rgba(18, 39, 67, 0.16);
}

#map-modal .modal-content {
  overflow: hidden;
  border-radius: 22px;
}

#map-modal .close {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(226, 233, 241, 0.92);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #33445d;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(18, 39, 67, 0.12);
}

#map-modal .close:hover,
#map-modal .close:focus {
  background: #fff;
  color: #172238;
}

#map-modal iframe {
  display: block;
  background: #f4f7fa;
}

#activity-modal .modal-content2 {
  padding: 22px;
  border-radius: 22px;
}

#activity-modal .modal-content2 label {
  display: block;
  margin: 0 0 7px;
  color: #33445d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

#activity-modal .modal-content2 input,
#activity-modal .modal-content2 textarea {
  box-sizing: border-box;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #e3eaf2;
  border-radius: 14px;
  background: #f8fafc;
  color: #26344a;
  font-family: var(--font-family);
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

#activity-modal .modal-content2 input:focus,
#activity-modal .modal-content2 textarea:focus {
  outline: none;
  border-color: rgba(8, 124, 241, 0.42);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 124, 241, 0.09);
}

#activity-modal .modal-content2 button {
  min-height: 44px;
  margin: 0 8px 0 0;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

#activity-modal #save-activity {
  background: linear-gradient(135deg, #16aefc, #087cf1);
  color: #fff;
  box-shadow: 0 8px 20px rgba(8, 124, 241, 0.16);
}

#activity-modal #cancel-activity {
  border-color: #e1e8f0;
  background: #f4f7fa;
  color: #53657a;
}

#activity-modal .modal-content2 button:active {
  transform: scale(0.98);
}

.modal-system .ms-input-group {
  margin-bottom: 10px;
}

.modal-system .ms-actions {
  margin-top: 16px;
}

.modal-system .ms-divider {
  margin: 18px 0;
}

.modal-system .ms-button-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.modal-system .cancelOnboarding {
  padding: 0 !important;
  border-radius: 50% !important;
  background: rgba(18, 34, 56, 0.72) !important;
  color: #fff !important;
  font-size: 16px;
}

/* Compact confirmation dialogs:
   stronger visual hierarchy for question/confirm modals only.
   No DOM, copy, IDs, handlers or behavior are changed. */
:is(
  #deleteModal,
  #deleteModalFavorite,
  #deleteActivityModal,
  #deleteNewOnboarding,
  #newPlanningModal,
  #deleteTripModal
) {
  align-items: center !important;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(8, 18, 33, 0.46);
}

:is(
  #deleteModal,
  #deleteModalFavorite,
  #deleteActivityModal,
  #deleteNewOnboarding,
  #newPlanningModal,
  #deleteTripModal
) .modal-content1.modal-system {
  width: min(100%, 420px);
  max-width: 420px !important;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
  padding: 26px 24px 22px;
  border: 1px solid #e5ebf2;
  border-radius: 24px !important;
  background: #fff;
  justify-content: center;
  overflow: visible;
  box-shadow:
    0 22px 60px rgba(18, 39, 67, 0.18),
    0 3px 10px rgba(18, 39, 67, 0.06);
}

:is(
  #deleteModal,
  #deleteModalFavorite,
  #deleteActivityModal,
  #deleteNewOnboarding,
  #newPlanningModal,
  #deleteTripModal
) .modal-content1.modal-system::before {
  content: "";
  width: 42px;
  height: 5px;
  margin: 0 auto 22px;
  border-radius: 999px;
  background: #e8eef5;
}

:is(
  #deleteModal,
  #deleteModalFavorite,
  #deleteActivityModal,
  #deleteNewOnboarding,
  #newPlanningModal,
  #deleteTripModal
) .ms-text {
  max-width: 340px;
  margin: 0 auto;
  color: #26344a;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.42;
  letter-spacing: -0.015em;
  text-align: center;
}

:is(
  #deleteModal,
  #deleteModalFavorite,
  #deleteActivityModal,
  #deleteNewOnboarding,
  #newPlanningModal,
  #deleteTripModal
) .ms-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 24px;
}

:is(
  #deleteModal,
  #deleteModalFavorite,
  #deleteActivityModal,
  #deleteNewOnboarding,
  #newPlanningModal,
  #deleteTripModal
) .ms-button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.15;
  white-space: normal;
  box-shadow: none;
}

:is(
  #deleteModal,
  #deleteModalFavorite,
  #deleteActivityModal,
  #deleteNewOnboarding,
  #newPlanningModal,
  #deleteTripModal
) .ms-button-secondary {
  order: 1;
  border: 1px solid #e2e8f0;
  background: #f6f8fb;
  color: #53657a;
}

:is(
  #deleteModal,
  #deleteModalFavorite,
  #deleteActivityModal,
  #deleteNewOnboarding,
  #newPlanningModal,
  #deleteTripModal
) .ms-button-danger {
  order: 2;
  border: 1px solid #f2d7d7;
  background: #fff1f1;
  color: #c93f3f;
}

:is(
  #deleteModal,
  #deleteModalFavorite,
  #deleteActivityModal,
  #deleteNewOnboarding,
  #newPlanningModal,
  #deleteTripModal
) .ms-button-danger:hover {
  border-color: #efcaca;
  background: #ffe8e8;
  color: #b93232;
  transform: none;
}

:is(
  #deleteModal,
  #deleteModalFavorite,
  #deleteActivityModal,
  #deleteNewOnboarding,
  #newPlanningModal,
  #deleteTripModal
) .ms-button-secondary:hover {
  border-color: #dbe3ec;
  background: #eef3f8;
  transform: none;
}

/* Question/action modal with a selector: same compact family, blue confirmation. */
#selectDayItineraryModal {
  align-items: center !important;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(8, 18, 33, 0.46);
}

#selectDayItineraryModal .modal-content4.modal-system {
  width: min(100%, 440px);
  max-width: 440px !important;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
  padding: 26px 24px 22px !important;
  border: 1px solid #e5ebf2;
  border-radius: 24px !important;
  background: #fff;
  justify-content: center;
  overflow: visible;
  box-shadow:
    0 22px 60px rgba(18, 39, 67, 0.18),
    0 3px 10px rgba(18, 39, 67, 0.06);
}

#selectDayItineraryModal .ms-title {
  margin: 0 0 20px;
  color: #26344a;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-align: center;
}

#selectDayItineraryModal .ms-input-group {
  margin: 0;
}

#selectDayItineraryModal .ms-select {
  min-height: 48px;
}

#selectDayItineraryModal .ms-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 20px;
}

#selectDayItineraryModal .ms-button {
  min-height: 48px;
}

@media (max-width: 380px) {
  :is(
    #deleteModal,
    #deleteModalFavorite,
    #deleteActivityModal,
    #deleteNewOnboarding,
    #newPlanningModal,
    #deleteTripModal
  ) {
    padding: 12px;
  }

  :is(
    #deleteModal,
    #deleteModalFavorite,
    #deleteActivityModal,
    #deleteNewOnboarding,
    #newPlanningModal,
    #deleteTripModal
  ) .modal-content1.modal-system,
  #selectDayItineraryModal .modal-content4.modal-system {
    padding-left: 18px !important;
    padding-right: 18px !important;
    border-radius: 22px !important;
  }

  :is(
    #deleteModal,
    #deleteModalFavorite,
    #deleteActivityModal,
    #deleteNewOnboarding,
    #newPlanningModal,
    #deleteTripModal
  ) .ms-text {
    font-size: 16px;
  }
}

