/* =========================================================
   ABANGADEKGANTENG
   UNIVERSAL SOCIAL SHARE CENTER
   ========================================================= */


/* =========================================================
   MAIN SHARE CONTAINER
   ========================================================= */

.universal-share {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}


/* =========================================================
   SHARE TITLE
   ========================================================= */

.universal-share > h3 {
  margin: 0 0 1rem;
  text-align: center;

  font-size: 1rem;
  font-weight: 700;

  color: var(--text-primary);

  letter-spacing: 0.02em;
}


/* =========================================================
   DEVICE SHARE DETAILS
   ========================================================= */

.device-share-details {
  width: 100%;
  margin-bottom: 1rem;

  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);

  background:
    linear-gradient(
      135deg,
      rgba(168, 85, 247, 0.08),
      rgba(59, 130, 246, 0.05)
    );

  overflow: hidden;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}


.device-share-details[open] {
  border-color: var(--accent-primary);

  box-shadow:
    0 0 0 1px
    rgba(168, 85, 247, 0.08);
}


/* =========================================================
   DEVICE SHARE SUMMARY
   ========================================================= */

.device-share-summary {
  min-height: 58px;

  padding: 0.75rem 1rem;

  display: flex;
  align-items: center;
  gap: 0.75rem;

  cursor: pointer;

  list-style: none;

  user-select: none;

  color: var(--text-primary);
}


/* Remove default marker */

.device-share-summary::-webkit-details-marker {
  display: none;
}


.device-share-summary::marker {
  display: none;
}


/* =========================================================
   DEVICE SHARE ICON
   ========================================================= */

.device-share-icon {
  width: 40px;
  height: 40px;

  flex: 0 0 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background: var(--accent-light);

  color: var(--accent-primary);

  font-size: 1.15rem;
}


/* =========================================================
   DEVICE SHARE TEXT
   ========================================================= */

.device-share-content {
  min-width: 0;

  flex: 1;
}


.device-share-title {
  display: block;

  font-size: 0.9rem;
  font-weight: 700;

  color: var(--text-primary);
}


.device-share-description {
  display: block;

  margin-top: 0.15rem;

  font-size: 0.72rem;

  color: var(--text-muted);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* =========================================================
   DETAILS ARROW
   ========================================================= */

.device-share-arrow {
  width: 30px;
  height: 30px;

  flex: 0 0 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: var(--text-muted);

  transition:
    transform 0.25s ease,
    color 0.2s ease;
}


.device-share-details[open]
.device-share-arrow {
  transform: rotate(180deg);

  color: var(--accent-primary);
}


/* =========================================================
   DEVICE SHARE CONTENT
   ========================================================= */

.device-share-body {
  padding: 0 1rem 1rem;
}


/* =========================================================
   DEVICE SHARE BUTTON
   ========================================================= */

.device-share-button {
  width: 100%;
  min-height: 50px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;

  padding: 0.75rem 1rem;

  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);

  background: var(--bg-secondary);
  color: var(--text-primary);

  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}


.device-share-button:hover {
  transform: translateY(-1px);

  border-color: var(--accent-primary);

  background: var(--accent-light);

  box-shadow:
    0 8px 25px
    rgba(168, 85, 247, 0.08);
}


.device-share-button:active {
  transform: scale(0.98);
}


.device-share-button:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}


/* =========================================================
   SOCIAL SHARE GRID
   ========================================================= */

.social-share-grid {
  width: 100%;

  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 0.75rem;

  align-items: stretch;
}


/* =========================================================
   UNIVERSAL SHARE BUTTON
   ========================================================= */

.social-share-btn {
  width: 100%;
  min-width: 0;

  /*
   Semua tombol memiliki tinggi yang sama.
  */

  height: 58px;
  min-height: 58px;

  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 0.55rem;

  padding: 0.75rem;

  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);

  background:
    linear-gradient(
      145deg,
      var(--bg-secondary),
      rgba(255, 255, 255, 0.015)
    );

  color: var(--text-primary);

  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;

  text-decoration: none;

  cursor: pointer;

  overflow: hidden;

  position: relative;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}


/* =========================================================
   BUTTON HOVER
   ========================================================= */

.social-share-btn:hover {

  transform: translateY(-2px);

  border-color: var(--accent-primary);

  background:
    linear-gradient(
      145deg,
      var(--accent-light),
      var(--bg-secondary)
    );

  box-shadow:
    0 10px 25px
    rgba(168, 85, 247, 0.09);
}


/* =========================================================
   BUTTON ACTIVE
   ========================================================= */

.social-share-btn:active {
  transform: scale(0.97);
}


/* =========================================================
   BUTTON FOCUS
   ========================================================= */

.social-share-btn:focus-visible {

  outline: 2px solid var(--accent-primary);

  outline-offset: 3px;

}


/* =========================================================
   SHARE ICON
   ========================================================= */

.social-share-icon {

  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background: var(--accent-light);

  color: var(--accent-primary);

  font-size: 1rem;
  font-weight: 800;

  transition:
    transform 0.2s ease;
}


.social-share-btn:hover
.social-share-icon {

  transform: scale(1.08);

}


/* =========================================================
   SHARE LABEL
   ========================================================= */

.social-share-label {

  min-width: 0;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}


/* =========================================================
   WEBSITE BUTTON
   ========================================================= */

.social-share-btn[data-social-share="website"] {

  border-color:
    rgba(168, 85, 247, 0.35);

}


.social-share-btn[data-social-share="website"]
.social-share-icon {

  background:
    linear-gradient(
      135deg,
      rgba(168, 85, 247, 0.18),
      rgba(59, 130, 246, 0.14)
    );

}


/* =========================================================
   COPY BUTTON
   ========================================================= */

.social-share-btn[data-share-copy] {

  border-style: dashed;

}


.social-share-btn.share-copied {

  border-color: var(--accent-primary);

  background: var(--accent-light);

}


/* =========================================================
   DIVIDER
   ========================================================= */

.share-divider {

  width: 100%;

  height: 1px;

  margin: 1.25rem 0;

  background: var(--glass-border);

}


/* =========================================================
   URL PREVIEW
   ========================================================= */

.share-url-preview {

  width: 100%;

  box-sizing: border-box;

  margin-top: 1rem;

  padding: 0.9rem 1rem;

  border: 1px solid var(--glass-border);

  border-radius: var(--radius-md);

  background: var(--bg-secondary);

  text-align: center;

}


.share-url-preview-title {

  margin-bottom: 0.3rem;

  font-size: 0.65rem;

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 0.08em;

  color: var(--text-muted);

}


.share-url-preview-url {

  display: block;

  font-family: var(--font-mono);

  font-size: 0.75rem;

  font-weight: 500;

  line-height: 1.5;

  color: var(--accent-primary);

  word-break: break-all;

}


/* =========================================================
   SMALL DEVICES
   ========================================================= */

@media (max-width: 360px) {

  .social-share-grid {

    grid-template-columns: 1fr;

  }


  .social-share-btn {

    height: 56px;
    min-height: 56px;

  }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 600px) {

  .social-share-grid {

    grid-template-columns:
      repeat(3, minmax(0, 1fr));

  }

}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 900px) {

  .social-share-grid {

    grid-template-columns:
      repeat(4, minmax(0, 1fr));

  }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .social-share-btn,
  .social-share-icon,
  .device-share-arrow,
  .device-share-details,
  .device-share-button {

    transition: none;

  }

}