/* =====================================================================
   VMS UI (Shared Components)
   - Components reused in BOTH admin + portal
   - NO admin schedule grid rules here
   - NO portal page layout rules here
   ===================================================================== */

/* Navigation pills (used for view toggles, filters, etc.) */
.vms-portal-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0 16px;

  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Firefox */
}

.vms-portal-nav::-webkit-scrollbar {
  display: none;
}

.vms-portal-nav a {
  flex: 0 0 auto;
  max-width: 78vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

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

  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 999px;
  background: #fff;
  color: var(--vms-link);
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
}

.vms-portal-nav a:hover {
  background: rgba(34, 113, 177, .06);
}

.vms-portal-nav a.is-active {
  background: var(--vms-link);
  border-color: var(--vms-link);
  color: #fff;
}
 
/* Shared 7-column calendar table base (used by All Venues grid) */
.vms-av-grid {
  width: 100%;
  table-layout: fixed;

  /*
    Markup historically included inline styles like:
      border-collapse:separate; border-spacing:6px;
    Inline styles override normal CSS.
    These !important rules guarantee a stable grid.
  */
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}
 
.vms-av-grid th,
.vms-av-grid td {
  vertical-align: top;
  min-width: 0;
  box-sizing: border-box;
}

/* Number fields: hide browser spinner steppers (admin + public). */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Canonical notice system (shared admin + public) */
:root {
  --vms-notice-radius: 12px;
  --vms-notice-pad-y: 10px;
  --vms-notice-pad-x: 12px;
  --vms-notice-border-left: 5px;

  --vms-notice-info-text: #0a4b78;
  --vms-notice-info-border: #72aee6;
  --vms-notice-info-bg: #f0f6fc;

  --vms-notice-success-text: #0f5132;
  --vms-notice-success-border: #68b77b;
  --vms-notice-success-bg: #edf7ed;

  --vms-notice-warning-text: #5f370e;
  --vms-notice-warning-border: #dba617;
  --vms-notice-warning-bg: #fff8e5;

  --vms-notice-critical-text: #8a2424;
  --vms-notice-critical-border: #d63638;
  --vms-notice-critical-bg: #fcf0f1;
}

.vms-notice {
  margin: 10px 0 12px;
  padding: var(--vms-notice-pad-y) var(--vms-notice-pad-x);
  border: 1px solid #dcdcde;
  border-left: var(--vms-notice-border-left) solid #8c8f94;
  border-radius: var(--vms-notice-radius);
  background: #fff;
}

.vms-notice > p:first-child {
  margin-top: 0;
}

.vms-notice > p:last-child {
  margin-bottom: 0;
}

.vms-notice--info {
  color: var(--vms-notice-info-text);
  border-color: #b7d5f3;
  border-left-color: var(--vms-notice-info-border);
  background: var(--vms-notice-info-bg);
}

.vms-notice--success {
  color: var(--vms-notice-success-text);
  border-color: #c6dfc3;
  border-left-color: var(--vms-notice-success-border);
  background: var(--vms-notice-success-bg);
}

.vms-notice--warning {
  color: var(--vms-notice-warning-text);
  border-color: #efd59a;
  border-left-color: var(--vms-notice-warning-border);
  background: var(--vms-notice-warning-bg);
}

.vms-notice--critical,
.vms-notice--error {
  color: var(--vms-notice-critical-text);
  border-color: #efc9cd;
  border-left-color: var(--vms-notice-critical-border);
  background: var(--vms-notice-critical-bg);
}

/* Public venue calendar shortcode */
.vms-public-cal .vms-public-cal-filters {
  margin: 12px 0 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.vms-public-cal .vms-public-cal-label {
  font-weight: 700;
}

.vms-public-cal .vms-public-cal-label-month {
  margin-left: 8px;
}

.vms-public-cal .vms-public-cal-venue {
  min-width: 280px;
}

.vms-public-cal .vms-public-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 10px 0 12px;
  gap: 8px;
}

.vms-public-cal .vms-public-cal-title {
  font-weight: 800;
}

.vms-public-cal .vms-public-cal-nav-link {
  text-decoration: none;
}

.vms-public-cal .vms-cal-grid {
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.vms-public-cal .vms-cal-head {
  font-weight: 700;
  color: #374151;
  padding: 4px 2px;
}

.vms-public-cal .vms-cal-cell {
  min-height: 130px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 10px 12px;
  position: relative;
}

.vms-public-cal .vms-cal-empty {
  background: transparent;
  border-style: dashed;
}

.vms-public-cal .vms-cal-daynum {
  position: absolute;
  top: 8px;
  right: 10px;
  font-weight: 800;
  color: #9ca3af;
}

.vms-public-cal .vms-cal-card {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  border: 1px solid #f1f5f9;
  background: #f8fafc;
  border-radius: 12px;
  padding: 8px 10px;
  margin-top: 10px;
}

.vms-public-cal .vms-cal-card:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.vms-public-cal .vms-cal-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}

.vms-public-cal .vms-cal-avatar-fallback {
  background: #e5e7eb;
}

.vms-public-cal .vms-cal-card-text {
  min-width: 0;
  flex: 1;
}

.vms-public-cal .vms-cal-name {
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vms-public-cal .vms-cal-meta {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.vms-public-cal .vms-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid transparent;
}

.vms-public-cal .vms-badge-grey {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}

.vms-public-cal .vms-badge-amber {
  background: #fffbeb;
  color: #92400e;
  border-color: #fed7aa;
}

.vms-public-cal .vms-badge-green {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

@media (max-width: 782px) {
  .vms-public-cal .vms-public-cal-nav {
    flex-wrap: wrap;
  }

  .vms-public-cal .vms-cal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vms-public-cal .vms-public-cal-venue {
    min-width: 220px;
  }
}

@media (max-width: 520px) {
  .vms-public-cal .vms-cal-grid {
    grid-template-columns: 1fr;
  }

  .vms-public-cal .vms-public-cal-label-month {
    margin-left: 0;
  }

  .vms-public-cal .vms-public-cal-venue {
    min-width: 0;
    width: 100%;
  }
}

/* Ratings shortcode */
.vms-rating-form-wrapper .vms-rating-comment {
  width: 100%;
}
