/**
 * Campus Map Widget Styles
 *
 * Uses IABT CSS variables for consistent branding.
 */

/* ============================================
   Base Section
   ============================================ */
.cm-widget {
  position: relative;
  width: 100%;
  height: 600px;
  display: flex;
  align-items: center;
  padding: 0 12px;
}

/* Card Position Variants */
.cm-widget--card-right {
  justify-content: flex-end;
}

.cm-widget--card-left {
  justify-content: flex-start;
}

.cm-widget--card-center {
  justify-content: center;
}

/* ============================================
   Map Container
   ============================================ */
.cm-map-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cm-map-embed {
  width: 100%;
  height: 100%;
}

.cm-map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Editor placeholder */
.cm-editor-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--iabt-bg-soft);
  color: var(--iabt-text-secondary);
}

/* ============================================
   Location Card
   ============================================ */
.cm-location-card {
  position: relative;
  z-index: 10;
  background: var(--iabt-bg-main);
  padding: 48px;
  border-radius: 12px;
  width: 460px;
  max-width: 100%;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ============================================
   Card Title
   ============================================ */
.cm-card-title {
  font-size: 28px;
  line-height: 1.2;
  font-weight: var(--iabt-font-bold);
  color: var(--iabt-text-heading);
  margin: 0 0 8px 0;
  font-family: var(--iabt-font-family);
}

/* ============================================
   Address Row
   ============================================ */
.cm-address-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cm-pin-icon {
  margin-top: 4px;
  color: var(--iabt-text-secondary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-pin-icon svg {
  width: 24px;
  height: 24px;
}

.cm-address-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--iabt-text-secondary);
  margin: 0;
  font-family: var(--iabt-font-family);
}

/* ============================================
   Map Link
   ============================================ */
.cm-map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--iabt-primary);
  font-weight: var(--iabt-font-semibold);
  text-decoration: none;
  font-size: 15px;
  margin-top: 8px;
  font-family: var(--iabt-font-family);
  transition: color 0.2s ease;
}

.cm-map-link:hover {
  text-decoration: underline;
  color: var(--iabt-accent);
}

.cm-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.cm-link-icon svg {
  width: 18px;
  height: 18px;
}

.cm-map-link:hover .cm-link-icon {
  transform: translateX(4px);
}

/* ============================================
   Responsive - Large Tablet
   ============================================ */

/* ============================================
   Responsive - Tablet
   ============================================ */
@media (max-width: 1024px) {
  .cm-location-card {
    width: 380px;
    padding: 32px;
    gap: 20px;
  }

  .cm-card-title {
    font-size: 24px;
  }
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 768px) {
  .cm-widget {
    height: auto;
    flex-direction: column-reverse;
    padding: 0;
  }

  .cm-widget--card-right,
  .cm-widget--card-left,
  .cm-widget--card-center {
    justify-content: flex-start;
  }

  .cm-map-container {
    position: relative;
    height: 300px;
  }

  .cm-location-card {
    width: 100%;
    border-radius: 0;
    padding: 32px 24px;
    box-shadow: none;
  }

  .cm-card-title {
    font-size: 22px;
  }

  .cm-address-row {
    gap: 12px;
  }

  .cm-pin-icon svg {
    width: 20px;
    height: 20px;
  }

  .cm-address-text {
    font-size: 14px;
  }

  .cm-map-link {
    font-size: 14px;
  }
}

/* ============================================
   Responsive - Small Mobile
   ============================================ */
@media (max-width: 480px) {
  .cm-map-container {
    height: 250px;
  }

  .cm-location-card {
    padding: 24px 16px;
    gap: 16px;
  }

  .cm-card-title {
    font-size: 20px;
  }

  .cm-address-text {
    font-size: 13px;
  }

  .cm-link-icon svg {
    width: 16px;
    height: 16px;
  }
}

/* ============================================
   Blend with Footer Option
   ============================================ */
.cm-blend-footer {
  margin-bottom: -46px; /* Overlap the footer curve (height 46px) */
  z-index: 0;
  position: relative;
}
