/* === YA-EVENT Date Check Widget + Scroll-to-top === */

/* ── Scroll-to-top ── */
.ya-scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99997;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2825, #3a3733);
  color: #fafafa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.30);
  transition: transform .15s, box-shadow .15s;
}
.ya-scroll-top:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0,0,0,.40);
}
.ya-scroll-top svg {
  width: 20px;
  height: 20px;
}
@media (max-width: 480px) {
  .ya-scroll-top {
    right: 16px;
    bottom: 20px;
    width: 40px;
    height: 40px;
  }
  .ya-scroll-top svg { width: 18px; height: 18px; }
}

/* ── Date Check Widget ── */
.ya-date-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99998;
  animation: ya-date-fade .2s ease;
}
.ya-date-overlay.active { display: block; }

@keyframes ya-date-fade { from{opacity:0} to{opacity:1} }
@keyframes ya-date-slide { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }

.ya-date-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: 380px;
  max-width: 92vw;
  max-height: 85vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  z-index: 99999;
  animation: ya-date-slide .25s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ya-date-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ya-date-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}
.ya-date-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.ya-date-close:hover { background: #e8e8e8; }

.ya-date-body { padding: 20px 24px; }

.ya-date-field { margin-bottom: 16px; }
.ya-date-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}
.ya-date-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  color: #333;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
  -webkit-appearance: none;
}
.ya-date-field input:focus { border-color: #c8a96e; }

.ya-date-submit {
  width: 100%;
  padding: 12px;
  background: #c8a96e;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  margin-top: 4px;
}
.ya-date-submit:hover { background: #b89555; }
.ya-date-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.ya-date-results { margin-top: 16px; }

.ya-date-venue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #f9f9f9;
  border: 1px solid #eee;
}
.ya-date-venue-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}
.ya-date-venue-info {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.ya-date-venue-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 12px;
}
.ya-date-status-available {
  background: #e8f5e9;
  color: #2e7d32;
}
.ya-date-status-limited {
  background: #fff8e1;
  color: #f57f17;
}
.ya-date-status-unavailable {
  background: #fce4ec;
  color: #c62828;
}

.ya-date-error {
  padding: 12px;
  background: #fce4ec;
  color: #c62828;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
}

.ya-date-footer {
  padding: 12px 24px 20px;
  text-align: center;
  font-size: 11px;
  color: #aaa;
}

/* Toggle button */
.ya-date-toggle {
  position: fixed;
  right: 24px;
  bottom: 200px;
  z-index: 99997;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  height: 48px;
  background: linear-gradient(135deg, #2a2825, #3a3733);
  color: #fafafa;
  border: none;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.30);
  transition: transform .15s, box-shadow .15s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.ya-date-toggle:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 24px rgba(0,0,0,.40);
}
.ya-date-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .ya-date-toggle {
    right: 16px;
    bottom: 176px;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    font-size: 0;
    gap: 0;
  }
  .ya-date-toggle svg {
    width: 22px;
    height: 22px;
  }
  .ya-date-panel {
    width: calc(100vw - 24px);
    max-height: 80vh;
  }
  .ya-date-venue {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .ya-date-venue-status {
    margin-left: 0;
  }
}
