.mam-agenda,
.mam-today-card {
  --mam-fs-title: 1.5rem;
  --mam-fs-label: 1.06rem;
  --mam-fs-body: 1rem;
  --mam-fs-time: 1rem;
  --mam-fs-meta: 0.88rem;
  --mam-fw-strong: 700;
  --mam-fw-semi: 600;
  --mam-fw-regular: 500;
}

.mam-today-card {
  border: 1px solid #d7d0c6;
  border-radius: 7px;
  overflow: hidden;
  background: #f7f4ee;
  width: 100%;
  font-family: "Segoe UI", Tahoma, sans-serif;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.mam-today-head {
  background: #8e4a11;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
}

.mam-today-head strong {
  font-size: var(--mam-fs-label);
  font-weight: var(--mam-fw-strong);
  letter-spacing: 0.2px;
}

.mam-today-head span {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: var(--mam-fw-strong);
  font-size: var(--mam-fs-meta);
}

.mam-today-body {
  padding: 10px;
}

.mam-today-empty {
  background: #ffffff;
  border: 1px dashed #d5ccc0;
  border-radius: 6px;
  padding: 10px 12px;
  color: #8f7f68;
  font-style: italic;
}

.mam-today-line {
  background: #ffffff;
  border: 1px solid #d9d2c8;
  border-radius: 6px;
  padding: 9px 12px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.mam-today-line:last-child {
  margin-bottom: 0;
}

.mam-today-place {
  color: #161616;
  font-size: var(--mam-fs-body);
  font-weight: var(--mam-fw-semi);
}

.mam-today-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.mam-today-left .mam-today-place {
  min-width: 0;
}

.mam-today-time {
  border: 1px solid #d7cfc4;
  border-radius: 6px;
  padding: 5px 10px;
  color: #8a4a16;
  font-size: var(--mam-fs-time);
  font-weight: var(--mam-fw-semi);
  background: #fcfbf9;
}

.mam-agenda {
  border: 1px solid #e2dbd1;
  border-radius: 10px;
  background: #f8f5ef;
  padding: 16px;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.mam-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid #d7cab7;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.mam-head h2 {
  margin: 0;
  color: #4e3518;
  font-size: var(--mam-fs-title);
  font-weight: var(--mam-fw-strong);
}

.mam-sub {
  margin: 0;
  color: #7a6f61;
  font-size: var(--mam-fs-meta);
  font-weight: var(--mam-fw-regular);
}

.mam-month {
  margin-left: auto;
  color: #4e3518;
  font-size: var(--mam-fs-label);
  font-weight: var(--mam-fw-strong);
  letter-spacing: 1px;
}

.mam-day {
  border-bottom: 1px solid #dfd2c1;
  padding: 12px 0;
  padding-top: 0;
}

.mam-month-break {
  margin-top: 12px;
  margin-bottom: 10px;
  padding-top: 10px;
}

.mam-month-break.mam-head {
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.mam-month-break.mam-head h2 {
  font-size: var(--mam-fs-title);
}

.mam-month-break.mam-head .mam-month {
  font-size: var(--mam-fs-label);
}

.mam-day:last-child {
  border-bottom: 0;
}

.mam-day-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #8e4a11;
  color: #ffffff;
  border-radius: 7px;
  padding: 9px 14px;
  margin-bottom: 10px;
}

.mam-day-label strong {
  color: #ffffff;
  font-size: var(--mam-fs-label);
  font-weight: var(--mam-fw-strong);
  letter-spacing: 0.2px;
}

.mam-day-label span {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 3px 10px;
  color: #ffffff;
  font-size: var(--mam-fs-meta);
  font-weight: var(--mam-fw-strong);
}

.mam-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #ddd4c9;
  border-radius: 6px;
  padding: 7px 10px;
  margin-bottom: 7px;
}

.mam-line:last-child {
  margin-bottom: 0;
}

.mam-time {
  color: #4c3a21;
  font-size: var(--mam-fs-time);
  font-weight: var(--mam-fw-semi);
  margin-left: auto;
  white-space: nowrap;
  border: 1px solid #d7cfc4;
  border-radius: 6px;
  padding: 4px 10px;
  background: #fcfbf9;
}

.mam-place {
  color: #222222;
  font-size: var(--mam-fs-body);
  font-weight: var(--mam-fw-semi);
  margin-right: 2px;
}

.mam-note {
  color: #6c6255;
  font-size: var(--mam-fs-meta);
  font-weight: var(--mam-fw-regular);
  margin-right: 4px;
}

@keyframes mam-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.55); }
  50%       { box-shadow: 0 0 0 5px rgba(255, 0, 0, 0); }
}

@keyframes mam-live-fadein {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.mam-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #f2b9b9;
  background: #fff3f3;
  color: #7a1d1d;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  animation: mam-live-fadein 0.4s ease both;
}

.mam-live-logo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}

.mam-live-play {
  position: relative;
  width: 18px;
  height: 12px;
  background: #ff0000;
  border-radius: 4px;
  animation: mam-live-pulse 1.6s ease-in-out infinite;
}

.mam-live-play::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 2px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #ffffff;
}

.mam-live-label {
  color: #b42318;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.mam-tipo {
  font-size: var(--mam-fs-meta);
  color: #0f766e;
  font-style: italic;
  font-weight: var(--mam-fw-regular);
  margin-right: 4px;
}

.mam-highlight {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  border: 1px dashed #c9b89f;
  background: #f2ecdf;
}

.mam-highlight h3,
.mam-highlight h4,
.mam-highlight p {
  margin: 0 0 8px;
}

.mam-highlight p {
  margin-bottom: 0;
}

.mam-locations {
  border: 1px solid #e2dbd1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  padding: 14px;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.mam-locations-head h2 {
  margin: 0 0 4px;
  color: #1f3554;
  font-size: 1.45rem;
}

.mam-locations-head p {
  margin: 0 0 10px;
  color: #4f6074;
}

.mam-map {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #cfd8e5;
  overflow: hidden;
}

.mam-map-status {
  margin: 8px 2px 0;
  color: #5b6f86;
  font-size: 0.9rem;
}

.mam-location-cards {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.mam-location-card {
  background: #ffffff;
  border: 1px solid #d9e3ef;

  .mam-today-line {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .mam-today-time {
    justify-self: end;
  }
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(25, 58, 94, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mam-location-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(25, 58, 94, 0.14);
}

.mam-location-card h3 {
  margin: 0 0 6px;
  color: #243447;
  font-size: 1rem;
}

.mam-location-thumb {
  width: 100%;
  height: 126px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d8e1ed;
  margin-bottom: 8px;
}

.mam-location-card p {
  margin: 0 0 4px;
  color: #4b5f77;
  font-size: 0.92rem;
}

.mam-location-note {
  color: #6f4d2f;
  font-style: italic;
}

.mam-location-open {
  margin-top: 8px;
  border: 1px solid #2f5d91;
  background: #f1f7ff;
  color: #234972;
  border-radius: 7px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 600;
}

.mam-location-modal[hidden] {
  display: none;
}

.mam-location-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.mam-location-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 22, 31, 0.6);
  backdrop-filter: blur(2px);
}

.mam-location-modal-inner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 460px);
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #d3dce8;
  padding: 18px;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.28);
}

.mam-location-modal-close {
  position: absolute;
  right: 10px;
  top: 8px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #6b7280;
}

.mam-modal-title {
  margin: 0 0 8px;
  color: #1f2937;
}

.mam-modal-photo {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d7dfe9;
  margin: 0 0 10px;
  display: none;
}

.mam-modal-address,
.mam-modal-note {
  margin: 0 0 8px;
  color: #425569;
}

.mam-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mam-modal-actions a {
  text-decoration: none;
  border-radius: 7px;
  padding: 8px 10px;
  border: 1px solid #244d7a;
  color: #1f4a77;
  background: #f3f8ff;
  font-weight: 600;
}

@media (max-width: 768px) {
  .mam-today-card {
    max-width: 100%;
  }

  .mam-head {
    flex-wrap: wrap;
  }

  .mam-month {
    margin-left: 0;
  }

  .mam-line {
    gap: 8px;
  }

  .mam-location-cards {
    grid-template-columns: 1fr;
  }

  .mam-note {
    width: 100%;
    margin-right: 0;
  }

  .mam-tipo {
    width: 100%;
    margin-right: 0;
  }

  .mam-time {
    margin-left: auto;
  }
}
