/**
 * Content toolbar + iOS-style share sheet.
 */

.content-toolbar {
  margin: 0 0 20px;
}

.content-toolbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #f7f7f9;
  border: 1px solid #e8e8ec;
  border-radius: 6px;
}

.content-toolbar__reading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  color: #7a7b86;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
}

.content-toolbar__sep {
  color: #c5c6d0;
}

.content-toolbar__date time {
  font-weight: 500;
  color: #5c5d68;
}

.content-toolbar__icon {
  display: block;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: #4246e1;
  overflow: visible;
}

.content-toolbar__share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid #4246e1;
  border-radius: 4px;
  background: #fff;
  color: #4246e1;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.content-toolbar__share-btn:hover {
  background: #4246e1;
  color: #fff;
}

.content-toolbar__share-btn:hover .content-toolbar__icon {
  color: #fff;
}

/* Share sheet (bottom sheet) */
.content-share-sheet {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.content-share-sheet[hidden] {
  display: none !important;
}

.content-share-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 31, 31, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.content-share-sheet__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  margin: 0 12px 12px;
  padding: 8px 12px 12px;
  background: #f2f2f7;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(110%);
  transition: transform 0.28s ease;
}

.content-share-sheet.is-open .content-share-sheet__panel {
  transform: translateY(0);
}

.content-share-sheet__handle {
  width: 32px;
  height: 3px;
  margin: 2px auto 10px;
  border-radius: 999px;
  background: #c7c7cc;
}

.content-share-sheet__title {
  margin: 0 0 2px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #1c1c1e;
}

.content-share-sheet__subtitle {
  margin: 0 0 10px;
  text-align: center;
  font-size: 12px;
  color: #8e8e93;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-share-sheet__actions {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.content-share-sheet__actions li + li {
  border-top: 1px solid #ebebef;
}

.content-share-sheet__action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #383838;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.content-share-sheet__action:hover {
  background: #f7f7f9;
  color: #383838;
}

.content-share-sheet__action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #fff;
  flex-shrink: 0;
}

.content-share-sheet__action-icon svg {
  display: block;
  width: 14px;
  height: 14px;
}

.content-share-sheet__action-icon--mail {
  background: #4246e1;
}

.content-share-sheet__action-icon--wa {
  background: #25d366;
  color: #fff;
}

.content-share-sheet__action-icon--wa svg {
  fill: currentColor;
  color: #fff;
}

.content-share-sheet__action-icon--copy {
  background: #636366;
}

.content-share-sheet__cancel {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #4246e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.content-share-sheet__cancel:hover {
  background: #f7f7f9;
}

body.content-share-open {
  overflow: hidden;
}

@media (max-width: 575px) {
  .content-toolbar__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .content-toolbar__share-btn {
    justify-content: center;
  }

  .content-toolbar__reading {
    row-gap: 4px;
  }
}
