/*
 * One close (×) button for the whole website: sheets, menus, messages, pop-ups.
 * Use the Blade component <x-close-button /> (or class "e7-close" with the same SVG in JavaScript).
 * Soft lavender circle, violet ×, always perfectly centred; turns solid violet on hover.
 * Bootstrap's own .btn-close (e.g. on success messages) gets the same look.
 */
.e7-close,
.btn-close {
  --x-size: 36px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--x-size);
  height: var(--x-size);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f3effe;
  color: #6a4de0;
  opacity: 1;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(122, 92, 240, .14);
  transition: background-color .2s ease, color .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .2s ease;
}
.e7-close svg { display: block; width: 16px; height: 16px; }
.e7-close:hover, .btn-close:hover {
  background-color: #7a5cf0;
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(122, 92, 240, .55);
  transform: rotate(90deg);
  opacity: 1;
}
.e7-close:active, .btn-close:active { transform: rotate(90deg) scale(.92); }
.e7-close:focus-visible, .btn-close:focus { outline: 0; box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(122, 92, 240, .55); opacity: 1; }
.e7-close-sm, .btn-close.btn-close-sm { --x-size: 30px; }
.e7-close-sm svg { width: 14px; height: 14px; }

/* Bootstrap's .btn-close draws its × as a background image: replace it with a centred violet one */
.btn-close {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a4de0' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
}
.btn-close:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}
/* Dismissible messages: keep the button vertically centred on the right */
.alert-dismissible .btn-close { top: 50%; right: 10px; padding: 0; margin-top: calc(var(--x-size) / -2); }

@media (prefers-reduced-motion: reduce) {
  .e7-close, .btn-close { transition: none; }
  .e7-close:hover, .btn-close:hover, .e7-close:active, .btn-close:active { transform: none; }
}
