/* MARK: - Theme */

:root {
  --ak-theme-color: rgba(var(--bs-tertiary-bg-rgb), 1);
  --ak-gold: #ffc107;
  --ak-silver: #c0c0c0;
  --ak-bronze: #cd7f32;
}

.text-gold {
  color: var(--ak-gold) !important;
}

.text-silver {
  color: var(--ak-silver) !important;
}

.text-bronze {
  color: var(--ak-bronze) !important;
}

.bg-gold {
  background-color: var(--ak-gold) !important;
}

.bg-silver {
  background-color: var(--ak-silver) !important;
}

.bg-bronze {
  background-color: var(--ak-bronze) !important;
}

/* Themed border utilities */
.border-gold {
  border: 2px solid var(--ak-gold) !important;
}

.border-silver {
  border: 2px solid var(--ak-silver) !important;
}

.border-bronze {
  border: 2px solid var(--ak-bronze) !important;
}

.border-none {
  border: none !important;
}

/* Optional subtle glow effect */
.shadow-gold {
  box-shadow: 0 0 .5rem rgba(255, 193, 7, .3) !important;
}

/* warning-ish */
.shadow-silver {
  box-shadow: 0 0 .5rem rgba(192, 192, 192, .4) !important;
}

.shadow-bronze {
  box-shadow: 0 0 .5rem rgba(205, 127, 50, .4) !important;
}

/* MARK: - Layout */

@media (prefers-reduced-motion: reduce) {
  .ak-navbar .navbar-brand {
    transition: none
  }
}

@media (max-width: 991.98px) {
  .ak-navbar .ak-navbar-toggle {
    width: 4.25rem
  }

  .ak-navbar .offcanvas-lg {
    box-shadow: var(--bs-box-shadow-lg)
  }

  .ak-navbar-icon-container {
    display: inline-block;
    min-width: 22px;
  }
}

@media (min-width: 576px) {
  .ak-image-cropper-container {
    /* your width rule */
    height: 70vh;
    /* 50% of viewport height */
    min-height: 400px;
    /* but never smaller than 500px */
    margin: 0 auto;
    overflow: hidden;
    position: relative;
  }
}

@media (max-width: 575.98px) {
  .ak-image-cropper-container {
    width: 100%;
    height: 100%;
  }
}

/* MARK: - Core */

.nowrap {
  white-space: nowrap;
}

.ak-form-valid-color {
  color: var(--bs-form-valid-color);
}

.ak-gutter {
  --bs-gutter-x: 3rem;
}

.ak-navbar {
  padding: .75rem 0;
  /* background-color: transparent; */
  /* box-shadow: 0 .5rem 1rem #00000026, inset 0 -1px #ffffff26 */
}

.ak-navbar:after {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  content: "";
  background-image: linear-gradient(rgba(var(--bs-tertiary-bg-rgb), 1), rgba(var(--bs-tertiary-bg-rgb), .95))
}

.ak-navbar .navbar-toggler {
  padding: 0;
  margin-right: -.5rem;
  border: 0
}

.ak-navbar .navbar-toggler:first-child {
  margin-left: -.5rem
}

.ak-navbar .navbar-toggler .bi {
  width: 1.5rem;
  height: 1.5rem
}

.ak-navbar .navbar-toggler:focus {
  box-shadow: none
}

.ak-navbar .navbar-brand {
  /* color: #fff; */
  transition: transform .2s ease-in-out
}

.ak-navbar .navbar-brand:hover {
  transform: scale(1.05)
}

.ak-navbar .navbar-toggler.active,
.ak-navbar .nav-link.active {
  font-weight: 600;
}

.ak-navbar .navbar-nav-svg {
  display: inline-block;
  vertical-align: -.125rem
}

.ak-navbar .dropdown-toggle:focus:not(:focus-visible) {
  outline: 0
}

.ak-navbar .dropdown-menu {
  --bs-dropdown-min-width: 12rem;
  --bs-dropdown-padding-x: .25rem;
  --bs-dropdown-padding-y: .25rem;
  --bs-dropdown-font-size: .875rem;
  font-size: .875rem;
  border-radius: .5rem;
  box-shadow: var(--bs-box-shadow)
}

.ak-navbar .dropdown-menu li+li {
  margin-top: .125rem
}

.ak-navbar .dropdown-menu .dropdown-item {
  border-radius: .25rem
}

.ak-navbar .dropdown-menu .dropdown-item:active .bi {
  color: inherit !important
}

.ak-navbar .dropdown-menu .active {
  font-weight: 600
}

.ak-navbar .dropdown-menu .active .bi {
  display: block !important
}

.ak-navbar .dropdown-menu-end {
  --bs-dropdown-min-width: 8rem
}

/* MARK: - Entries */

@media (min-width: 992px) {
  .ak-entries-layout {
    display: grid;
    grid-template-areas: "filters entries";
    grid-template-columns: 12rem 1fr;
    gap: 1.5rem;
  }
}

.ak-entry-card-image-container {
  --bs-aspect-ratio: 120%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-top-left-radius: var(--bs-card-inner-border-radius, .375rem);
  border-top-right-radius: var(--bs-card-inner-border-radius, .375rem);
}

.ak-entry-card-image-container::after {
  content: "";
  position: absolute;
  inset: -10%;
  background: var(--bg-url) center/cover no-repeat;
  filter: blur(24px) brightness(75%);
  transform: scale(1.2);
  z-index: 0;
  pointer-events: none;
}

/* The real image must fill the ratio box */
.ak-entry-card-image-container>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  z-index: 1;
  border-radius: 0;
}

.ak-entry-card-user-image {
  height: 1.5rem;
  width: 1.5rem;
}

.ak-entry-card {
  transition: all 0.2s ease;
}

.ak-entry-card a:hover img,
.ak-entry-card a:hover~.card-body {
  filter: brightness(0.9);
  /* slightly darken image */
  background-color: rgba(0, 123, 255, 0.01);
  /* subtle highlight on body */
}

.ak-entry-card:has(> a:hover) {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-2px);
}

/* MARK: - Entry Detail/Edit */

/* Layout (desktop) */
.entry-view-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
}

/* Photo column hugs image width and can shrink */
.entry-view-photo-col {
  display: flex;
  align-items: flex-start;
  /* no grow, allow shrink */
  flex: 0 1 auto;
  /* hug image width */
  width: fit-content;
  /* allow shrinking below intrinsic size */
  min-width: 0;
}

/* Card column: fixed fraction, centers its contents */
.entry-view-card-col {
  flex: 1 1 auto;
  /* floor for narrow screens */
  max-width: 24rem;
  min-width: 18rem;
}

/* Image: scales by constraints, keeps ratio */
.entry-view-photo-col img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: max(80vh, 30rem);
  border-radius: .5rem;
}

/* Mobile layout */
@media (max-width: 767.98px) {
  .entry-view-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .entry-view-photo-col {
    /* flex: none; */
    justify-content: center;
    width: 100%;
  }

  .entry-view-card-col {
    width: 100%;
    max-width: 26rem;
    margin-inline: auto;
  }
}

@media (max-width: 575.98px) {
    .entry-view-card-col {
    max-width: 100%;
  }
}

/* MARK: - Cropper (cropperjs) */

.cropper-view-box,
.cropper-face {
  border-radius: 50% !important;
}

.cropper-view-box {
  outline: 2px solid #39f;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5);
}

.cropper-dashed,
.cropper-center {
  display: none !important;
}

.cropper-line.line-e,
.cropper-line.line-w {
  width: 1px !important;
  opacity: .5 !important;
}

.cropper-line.line-n,
.cropper-line.line-s {
  height: 1px !important;
  opacity: .5 !important;
}

/* MARK: - Layout */

.ak-narrow-page-container {
  max-width: 420px;
  width: 100%;
}

.ak-normal-page-container {
  max-width: 720px;
  width: 100%;
}

.ak-image-cropper-container img {
  display: block;
  max-width: 100%;
}

/* MARK: - Progile Image */

.ak-img-overlay-container {
  /* If we use icon below, we need to add slight padding to make overlay work better */
  /* <i class="bi bi-person-circle"></i> */
  /* Container must also have position-relative class */
  padding: 1px;
}

.ak-img-overlay {
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 3rem;
}

.ak-img-overlay-container:hover .ak-img-overlay {
  opacity: 1;
}

.ak-profile-image {
  /* Applied for images and for icons like below */
  /* <i class="bi bi-person-circle"></i> */
  width: 9rem;
  height: 9rem;
  object-fit: cover;
  font-size: 8rem;
  line-height: 1;
}





/* 1) Normalize the overlay button on iOS */
.ak-img-overlay {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  padding: 0;
  border-radius: 50%;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  cursor: pointer;

  opacity: 0;
  transition: opacity .15s ease-in-out;
  /* ensure the icon inside scales nicely on small screens */
  font-size: 2.25rem;
  /* tweak if needed */
}

/* 2) Show overlay on hover ONLY when device supports hover */
@media (hover: hover) and (pointer: fine) {
  .ak-img-overlay-container:hover .ak-img-overlay {
    opacity: 1;
  }
}

/* 3) Keep it accessible: show overlay when focused via keyboard */
.ak-img-overlay:focus-visible,
.ak-img-overlay-container:focus-within .ak-img-overlay {
  opacity: 1;
}

/* (Optional) subtle pressed feedback */
.ak-img-overlay:active {
  opacity: .9;
}







.icon-lg {
  font-size: 3rem;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}


/* MARK: - AllAuth */

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}
