/* NOTE: This project uses Picnic CSS as the base UI framework.
   Do NOT rewrite base styling unless extending or overriding intentionally. */

/* Reset & Base Theme from Picnic CSS */
@import url("https://cdn.jsdelivr.net/npm/picnic");

body {
  padding: 20px;
  background: #f9f9f9;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
  max-width: 960px;
  margin: auto;
}

.logo {
  width: 120px;
  margin-bottom: 1em;
}

.subtitle {
  color: #666;
  margin-bottom: 2em;
  font-size: 1.2rem;
}

details {
  margin-bottom: 1.5em;
  background: #fff;
  border-radius: 6px;
  padding: 1em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

details[open] summary {
  margin-bottom: 1em;
}

summary {
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
}

.badge {
  background-color: #e74c3c;
  color: white;
  border-radius: 1em;
  padding: 0.2em 0.6em;
  font-size: 0.8rem;
  margin-left: 0.5em;
}

.entry {
  border-radius: 4px;
  padding: 0.75em 1em;
  margin-bottom: 0.5em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: background 0.3s;
}

.entry.unread {
  background-color: #fffdea;
}

.entry.read {
  background-color: #f0f0f0;
  opacity: 0.75;
}

.entry-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.time {
  font-weight: bold;
  flex-shrink: 0;
}

.sms-body,
  .call-body {
    flex: 1 1 0;
    min-width: 0;
    white-space: normal;
    overflow-wrap: break-word;
    overflow: visible;
    text-overflow: unset;
    color: #0074d9;
    font-weight: 500;
  }

label.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

label.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

label.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

label.switch .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

label.switch input:checked + .slider {
  background-color: #2196f3;
}

label.switch input:checked + .slider:before {
  transform: translateX(24px);
}

.audio-wrapper audio {
  width: 100%;
  max-width: 240px;
  height: 44px;
}

.badge-missed,
.badge-answered {
  font-size: 0.7rem;
  padding: 2px 4px;
  margin-left: 4px;
}
@media screen and (max-width: 600px) {
  html {
    font-size: 55%;
  }

  .entry-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .entry-row .time {
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
  }

  .sms-body,
  .call-body {
    font-size: 1.2rem;
    white-space: normal;
    overflow-wrap: break-word;
    overflow: visible;
    text-overflow: unset;
    flex: 1;
    padding: 0 0.5em;
  }

  label.switch {
    flex-shrink: 0;
    margin-left: auto;
  }

  .badge,
  .badge-missed,
  .badge-answered {
    font-size: 1rem;
    padding: 3px 8px;
  }

  summary {
    font-size: 1.4rem;
  }

  .audio-wrapper audio {
    width: 100%;
    max-width: 100%;
    height: 64px !important;
  }

  .audio {
    height: 64px;
  }

  .search-bar input[type="text"],
  .toggle-btn {
    font-size: 1.2rem;
    padding: 8px;
  }
}
