﻿/* Home dashboard layout and tiles */

.home-dashboard {
  --home-page-bg: #0b2412;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.5rem 0.85rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.home-dash-tile-glass > .liquidGlass-effect,
.home-dash-tile-glass > .liquidGlass-tint,
.home-dash-tile-glass > .liquidGlass-shine {
  border-radius: inherit;
}

.home-dash-tile-glass:not(.home-dash-tile-glass--photo):not(.home-dash-tile-glass--image-only) > .liquidGlass-effect,
.home-dash-tile-glass:not(.home-dash-tile-glass--photo):not(.home-dash-tile-glass--image-only) > .liquidGlass-tint,
.home-dash-tile-glass:not(.home-dash-tile-glass--photo):not(.home-dash-tile-glass--image-only) > .liquidGlass-shine {
  display: none;
}

.home-dash-section-tag {
  margin: 0 0 1rem;
  font-family: 'AGFOR20', sans-serif;
  font-size: clamp(1.15rem, 4.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: #ffffff;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.35),
    0 0 14px rgba(0, 230, 118, 0.2);
}

.home-dash-section {
  display: flex;
  flex-direction: column;
  color: #fff;
  margin-top: 0;
  opacity: 1;
  transform: none;
}

.home-dash-subheading {
  margin: 0.35rem 0 0.1rem;
  font-family: 'AGFOR20', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.home-dash-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.home-dash-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  position: relative;
  z-index: 1;
  opacity: 1;
  transform: none;
}

.home-dash-tile:not(.home-dash-tile--locked):hover,
.home-dash-tile:not(.home-dash-tile--locked):focus-visible {
  z-index: 4;
}

.home-dash-tile:active {
  transform: scale(0.98);
}

.home-dash-tile--locked {
  cursor: default;
}

.home-dash-tile-glass {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 20px;
}

/* Frosted glass — matches login .liquidGlass-wrapper treatment */
.home-dash-tile-glass:not(.home-dash-tile-glass--photo):not(.home-dash-tile-glass--image-only) {
  background: transparent;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.32),
    0 4px 12px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Corner accent: follows border-radius curve, tapers to nothing at the ends */
.home-dash-tile-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 10;
  border: 5px solid var(--tile-border-accent, #fe9500);
  --tile-border-accent: #fe9500;
  -webkit-mask-image:
    radial-gradient(ellipse 280px 58px at top left,     black 25%, transparent 85%),
    radial-gradient(ellipse 280px 58px at bottom right, black 25%, transparent 85%);
  mask-image:
    radial-gradient(ellipse 280px 58px at top left,     black 25%, transparent 85%),
    radial-gradient(ellipse 280px 58px at bottom right, black 25%, transparent 85%);
}

.home-dash-tile:not(.home-dash-tile--locked):hover .home-dash-tile-glass,
.home-dash-tile:not(.home-dash-tile--locked):focus-visible .home-dash-tile-glass {
  transform: translateY(-4px);
}

.home-dash-tile:not(.home-dash-tile--locked):hover .home-dash-tile-glass:not(.home-dash-tile-glass--photo):not(.home-dash-tile-glass--image-only),
.home-dash-tile:not(.home-dash-tile--locked):focus-visible .home-dash-tile-glass:not(.home-dash-tile-glass--photo):not(.home-dash-tile-glass--image-only) {
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.38),
    0 8px 20px rgba(0, 0, 0, 0.24),
    0 0 32px rgba(254, 149, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.home-dash-tile:not(.home-dash-tile--locked):hover .home-dash-tile-body,
.home-dash-tile:not(.home-dash-tile--locked):focus-visible .home-dash-tile-body {
  z-index: 11;
}

.home-dash-tile--locked:active {
  transform: none;
}

.home-dash-tile:not(.home-dash-tile--photo) .home-dash-tile-glass {
  min-height: 5rem;
}

.home-dash-tile--locked .home-dash-tile-glass::before {
  --tile-border-accent: #e53935;
  border-color: var(--tile-border-accent);
}

/* Tile notch — page-colored overlay on top of the tile; card styling stays unchanged */
.home-dash-tile-glass:has(.home-dash-tile-body--notch)::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 4rem;
  height: 0.45rem;
  background: var(--home-page-bg, #0b2412);
  clip-path: polygon(
    0% 0%,
    100% 0%,
    calc(50% + 1.3rem) 89%,
    calc(50% - 1.3rem) 89%
  );
  z-index: 12;
  pointer-events: none;
}

.home-dash-tile-glass--photo {
  height: auto;
  min-height: 0;
}

.home-dash-tile--photo {
  align-self: start;
}

.home-dash-tile-photo {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.home-dash-tile-glass--photo > .liquidGlass-effect,
.home-dash-tile-glass--photo > .liquidGlass-tint,
.home-dash-tile-glass--photo > .liquidGlass-shine,
.home-dash-tile-glass--photo > .home-dash-tile-body {
  position: absolute;
  inset: 0;
}

.home-dash-tile-glass--photo .liquidGlass-effect {
  opacity: 0.35;
}

.home-dash-tile-glass--photo .liquidGlass-tint {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.45) 42%,
    rgba(0, 0, 0, 0.12) 100%
  );
}

.home-dash-tile--photo .home-dash-tile-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  justify-content: flex-end;
  padding: 0.75rem;
}

.home-dash-tile--photo .home-dash-tile-label {
  position: relative;
  z-index: 1;
  width: 100%;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

.home-dash-tile-hover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background 0.22s ease;
  pointer-events: none;
}

.home-dash-tile-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.15rem;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.home-dash-tile--buy-hover:hover .home-dash-tile-hover,
.home-dash-tile--buy-hover:focus-visible .home-dash-tile-hover {
  background: rgba(0, 0, 0, 0.58);
}

.home-dash-tile--buy-hover:hover .home-dash-tile-buy-btn,
.home-dash-tile--buy-hover:focus-visible .home-dash-tile-buy-btn {
  opacity: 1;
  transform: translateY(0);
}

.home-dash-tile-body {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 5rem;
  padding: 0.75rem 1.1rem;
  box-sizing: border-box;
}

.home-dash-tile-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding-right: clamp(3rem, 16vw, 4rem);
}

.home-dash-tile-body--no-icon {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
  padding: 0.75rem;
}

.home-dash-tile-body--no-icon .home-dash-tile-label {
  margin-top: 0;
  padding-top: 0;
}

.home-dash-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3.85rem;
  height: 3.85rem;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  color: #fe9500;
  font-size: 1.75rem;
}

.home-dash-tile-icon i {
  color: #fe9500;
}

.home-dash-tile--locked .home-dash-tile-icon {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  color: #e53935;
}

.home-dash-tile--locked .home-dash-tile-icon i {
  color: #e53935;
}

.home-dash-tile:not(.home-dash-tile--locked):hover .home-dash-tile-icon,
.home-dash-tile:not(.home-dash-tile--locked):focus-visible .home-dash-tile-icon {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.home-dash-tile:not(.home-dash-tile--locked):hover .home-dash-tile-icon i,
.home-dash-tile:not(.home-dash-tile--locked):focus-visible .home-dash-tile-icon i {
  filter: drop-shadow(0 0 6px rgba(254, 149, 0, 0.45));
}

.home-dash-tile-label {
  display: block;
  margin: 0;
  padding: 0;
  font-family: 'AGFOR20', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.home-dash-tile-sub {
  display: block;
  margin: 0;
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: normal;
  text-transform: none;
  color: rgba(255, 255, 255, 0.62);
}

.home-dash-tile-chevron {
  display: none;
}

.home-dash-tile-lock {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  color: #e53935;
}

.home-dash-tile-lock i {
  color: #e53935;
}

.home-menu-section--schedules {
  --home-section-icon-bg: rgba(192, 39, 45, 0.42);
  --home-section-icon-border: rgba(255, 140, 140, 0.55);
  --home-section-icon-shadow: rgba(192, 39, 45, 0.32);
  --home-section-icon-color: #ffcaca;
  --home-section-title: #ffc8c8;
}

.home-menu-section--results {
  --home-section-icon-bg: rgba(40, 167, 69, 0.4);
  --home-section-icon-border: rgba(140, 235, 170, 0.55);
  --home-section-icon-shadow: rgba(40, 167, 69, 0.3);
  --home-section-icon-color: #d4ffe4;
  --home-section-title: #b8f5cc;
}

.home-menu-section--grand-finals {
  --home-section-icon-bg: rgba(255, 193, 7, 0.42);
  --home-section-icon-border: rgba(255, 224, 130, 0.55);
  --home-section-icon-shadow: rgba(255, 193, 7, 0.32);
  --home-section-icon-color: #fff3c4;
  --home-section-title: #ffe082;
}

.home-menu-section--media {
  --home-section-icon-bg: rgba(89, 43, 202, 0.42);
  --home-section-icon-border: rgba(180, 150, 255, 0.55);
  --home-section-icon-shadow: rgba(89, 43, 202, 0.32);
  --home-section-icon-color: #ece0ff;
  --home-section-title: #d4c4ff;
}

.home-menu-section--tickets {
  --home-section-icon-bg: rgba(254, 149, 0, 0.42);
  --home-section-icon-border: rgba(255, 200, 120, 0.58);
  --home-section-icon-shadow: rgba(254, 149, 0, 0.32);
  --home-section-icon-color: #fff0d0;
  --home-section-title: #ffe0b0;
}

.home-menu-section--judges {
  --home-section-icon-bg: rgba(30, 116, 253, 0.42);
  --home-section-icon-border: rgba(140, 185, 255, 0.55);
  --home-section-icon-shadow: rgba(30, 116, 253, 0.32);
  --home-section-icon-color: #d8ecff;
  --home-section-title: #b8d4ff;
}

.home-menu-section--info {
  --home-section-icon-bg: rgba(108, 124, 148, 0.45);
  --home-section-icon-border: rgba(190, 200, 215, 0.55);
  --home-section-icon-shadow: rgba(108, 124, 148, 0.3);
  --home-section-icon-color: #eef3fb;
  --home-section-title: #d2dae6;
}

@media (min-width: 576px) {
  .home-dashboard {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .home-dash-rows {
    gap: 0.85rem;
  }

  .home-dash-tile-icon {
    width: 4rem;
    height: 4rem;
    font-size: 2rem;
  }

  .home-dash-section-tag {
    font-size: 1.55rem;
    margin-bottom: 1.1rem;
  }
}

@media (min-width: 992px) {
  .home-dashboard {
    display: block;
    column-count: 2;
    column-gap: 1.35rem;
    max-width: 1400px;
    padding: 0.75rem 1.25rem 2.25rem;
  }

  .home-dash-section {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    display: inline-block;
    width: 100%;
    min-width: 0;
    margin-top: 0;
    margin-bottom: 1.75rem;
    vertical-align: top;
  }

  .home-dash-section:last-child {
    margin-bottom: 0;
  }

  .home-dash-section-tag {
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    margin-bottom: 1rem;
  }

  .home-dash-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .home-dash-tile:not(.home-dash-tile--photo) .home-dash-tile-glass {
    min-height: 4.5rem;
  }

  .home-dash-tile-body {
    gap: 0.85rem;
    min-height: 5rem;
    padding: 0.75rem 1rem;
  }

  .home-dash-tile-icon {
    width: 3.85rem;
    height: 3.85rem;
    font-size: 1.85rem;
  }

  .home-dash-tile-label {
    font-size: 0.8rem;
  }

  .home-dash-tile-sub {
    font-size: 0.65rem;
  }
}
