/**
 * SHCC Site Glass — Club Cars look site-wide
 * Translucent black glass, white text/borders, accent buttons.
 */

:root {
  --shcc-glass: rgba(0, 0, 0, 0.7);
  --shcc-glass-soft: rgba(0, 0, 0, 0.45);
  --shcc-text: #ffffff;
  --shcc-border: #ffffff;
  --shcc-accent: #fff000;
  --shcc-accent-2: #ff6a00;
  --shcc-link: #8ec5f0;
  --shcc-radius: 12px;
  --shcc-content-max: min(1100px, 92vw);
}

/* Transparent page so Background Video shows through */
html {
  background: transparent !important;
}

body {
  background: transparent !important;
  color: var(--shcc-text) !important;
  text-align: center;
}

/* ---------- Symmetry / centering ---------- */
body .wp-site-blocks,
body .entry-content,
body .wp-block-post-content,
body main,
body article {
  text-align: center;
}

body .is-layout-constrained > * {
  margin-left: auto !important;
  margin-right: auto !important;
}

body .wp-block-group,
body .wp-block-columns,
body .wp-block-buttons,
body .wp-block-gallery,
body .wp-block-social-links,
body .wp-block-navigation {
  justify-content: center !important;
  align-items: center !important;
  justify-items: center;
}

body .wp-block-columns {
  gap: 1.5rem !important;
}

body .wp-block-column {
  text-align: center !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body .wp-block-column > * {
  width: 100%;
  max-width: 100%;
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body p,
body .wp-block-heading,
body .wp-block-paragraph,
body .wp-block-list,
body ul,
body ol {
  text-align: center !important;
}

body .wp-block-list,
body ul,
body ol {
  list-style-position: inside;
  padding-left: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body .wp-block-image,
body .wp-block-image img,
body figure.wp-block-image {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

body .wp-block-buttons,
body .wp-block-button {
  margin-left: auto !important;
  margin-right: auto !important;
  justify-content: center !important;
}

body .wp-block-buttons {
  display: flex !important;
  width: 100%;
}

/* Forms / plugin wrappers centered */
body form,
body .hot-rods-form,
body .hot-rods-filter,
body .hot-rods-gallery,
body .hot-rods-wrapper,
body .shcc-sc-wrapper,
body .shcc-mr-wrapper,
body .wp-block-search,
body .comment-respond {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

body .hot-rods-form,
body .hot-rods-filter,
body .shcc-sc-form,
body .wp-block-search {
  max-width: var(--shcc-content-max);
}

body label {
  text-align: center;
  display: block;
}

body input[type="text"],
body input[type="email"],
body input[type="url"],
body input[type="tel"],
body input[type="number"],
body input[type="search"],
body input[type="password"],
body input[type="date"],
body input[type="file"],
body select,
body textarea {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

body textarea {
  text-align: left;
}

body header.wp-block-template-part,
body footer.wp-block-template-part,
body .site-header,
body .site-footer {
  text-align: center;
}

body .wp-block-navigation {
  width: 100%;
}

body .wp-block-site-title,
body .wp-block-site-tagline {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body .wp-block-media-text {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}

body .wp-block-media-text__content,
body .wp-block-media-text__media {
  width: 100% !important;
  max-width: 720px;
  margin-left: auto !important;
  margin-right: auto !important;
}

body .wp-block-cover {
  justify-content: center !important;
  align-items: center !important;
}

body .wp-block-cover__inner-container {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

body table,
body .wp-block-table {
  margin-left: auto !important;
  margin-right: auto !important;
}

body .alignleft,
body .alignright {
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block;
}

body.admin-bar {
  /* keep WP admin bar usable */
}

/* Common theme / FSE wrappers */
body .wp-site-blocks,
body .wp-block-group,
body .wp-block-columns,
body .wp-block-column,
body .entry-content,
body .site-content,
body .site-main,
body main,
body article,
body .wp-block-post-content,
body .wp-block-query,
body .wp-block-post-template,
body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  color: var(--shcc-text);
}

/* Kill solid white/gray content slabs from theme */
body .wp-site-blocks,
body .wp-block-group:not(.shcc-no-glass),
body .wp-block-cover__inner-container,
body .entry-content,
body .site-content,
body main > .wp-block-group,
body .wp-block-template-part {
  background-color: transparent !important;
}

/* Glass panels for cards / boxed groups / asides */
body .wp-block-group.has-background,
body .wp-block-column.has-background,
body .wp-block-cover:not(.has-background-dim) .wp-block-cover__background,
body .wp-block-media-text,
body .wp-block-table,
body .wp-block-quote,
body .wp-block-pullquote,
body .wp-block-code,
body .wp-block-preformatted,
body .wp-block-verse,
body .wp-block-details,
body .wp-block-search,
body .wp-block-loginout,
body .comment-respond,
body .comments-area,
body .wp-block-comments,
body .wp-block-post-comments-form,
body .widget,
body .wp-block-latest-posts,
body .wp-block-latest-comments,
body .wp-block-categories,
body .wp-block-archives,
body .wp-block-tag-cloud,
body .wp-block-calendar,
body .wp-block-rss {
  background: var(--shcc-glass) !important;
  border: 1px solid var(--shcc-border) !important;
  border-radius: var(--shcc-radius);
  color: var(--shcc-text) !important;
}

/* Soft glass on nested content boxes without theme background class */
body .wp-block-group[style*="background"],
body .wp-block-column[style*="background"] {
  background-color: var(--shcc-glass) !important;
  color: var(--shcc-text) !important;
  border: 1px solid var(--shcc-border);
  border-radius: var(--shcc-radius);
}

/* Header / nav / footer chrome */
body header.wp-block-template-part,
body footer.wp-block-template-part,
body .wp-block-navigation,
body .site-header,
body .site-footer {
  background: var(--shcc-glass) !important;
  color: var(--shcc-text) !important;
  border-color: var(--shcc-border) !important;
}

body .wp-block-navigation,
body .wp-block-navigation a,
body .wp-block-navigation span,
body .wp-block-site-title a,
body .wp-block-site-title,
body .wp-block-site-tagline {
  color: var(--shcc-text) !important;
}

body .wp-block-navigation__submenu-container {
  background: var(--shcc-glass) !important;
  border: 1px solid var(--shcc-border) !important;
}

body .wp-block-navigation a:hover,
body .wp-block-navigation a:focus,
body .wp-block-site-title a:hover {
  color: var(--shcc-accent) !important;
}

/* Typography */
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body p,
body li,
body label,
body figcaption,
body .wp-block-post-title,
body .wp-block-post-title a,
body .wp-block-post-date,
body .wp-block-post-author,
body .wp-block-post-excerpt,
body .wp-block-heading {
  color: var(--shcc-text) !important;
}

body a:not(.wp-block-button__link):not(.wp-element-button):not([class*="button"]) {
  color: var(--shcc-link);
}

body a:not(.wp-block-button__link):not(.wp-element-button):not([class*="button"]):hover {
  color: var(--shcc-accent);
}

/* Buttons — Club Cars / Hot Rods gradient */
body .wp-block-button__link,
body .wp-element-button,
body button:not(.components-button):not([class*="admin"]):not(#wpadminbar button),
body input[type="submit"],
body input[type="button"],
body input[type="reset"],
body .button,
body .wp-block-search__button,
body .wp-block-file__button {
  background: linear-gradient(90deg, var(--shcc-accent), var(--shcc-accent-2)) !important;
  color: #000000 !important;
  border: 1px solid var(--shcc-border) !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 0 12px rgba(255, 240, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body .wp-block-button__link:hover,
body .wp-element-button:hover,
body button:not(.components-button):not([class*="admin"]):not(#wpadminbar button):hover,
body input[type="submit"]:hover,
body input[type="button"]:hover,
body input[type="reset"]:hover,
body .button:hover,
body .wp-block-search__button:hover,
body .wp-block-file__button:hover {
  transform: scale(1.03);
  box-shadow: 0 0 16px rgba(255, 240, 0, 0.9);
  color: #000000 !important;
}

/* Outline / secondary buttons still readable */
body .wp-block-button.is-style-outline .wp-block-button__link {
  background: var(--shcc-glass) !important;
  color: var(--shcc-text) !important;
  border: 1px solid var(--shcc-border) !important;
  box-shadow: none;
}

body .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: var(--shcc-accent) !important;
}

/*
 * Phones / narrow viewports: Gutenberg width-25/50 buttons + word-break:break-word
 * split labels mid-word (e.g. "Join The Club" → Joi / n / The / Clu / b).
 * Detect via viewport width (not UA). Keep desktop custom widths.
 */
@media (max-width: 781px) {
  body .wp-block-buttons > .wp-block-button.has-custom-width,
  body .wp-block-buttons > .wp-block-button[class*="wp-block-button__width"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  body .wp-block-button__link,
  body .wp-element-button {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
}

/* Forms — use background-color (not background shorthand) so select arrows survive */
body input[type="text"],
body input[type="email"],
body input[type="url"],
body input[type="tel"],
body input[type="number"],
body input[type="search"],
body input[type="password"],
body input[type="date"],
body input[type="file"],
body select,
body textarea,
body .wp-block-search__input {
  background-color: var(--shcc-glass-soft) !important;
  color: var(--shcc-text) !important;
  border: 1px solid var(--shcc-border) !important;
  border-radius: 6px !important;
}

body input::placeholder,
body textarea::placeholder {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* Custom chevron — native arrow is hidden by glass + appearance resets elsewhere */
body select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  padding-right: 40px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M4.2 6.2a.75.75 0 0 1 1.06 0L8 8.94l2.74-2.74a.75.75 0 1 1 1.06 1.06l-3.27 3.27a.75.75 0 0 1-1.06 0L4.2 7.26a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px 16px !important;
  cursor: pointer;
}

body select::-ms-expand {
  display: none;
}

body select option,
body select optgroup {
  background: #111;
  color: #fff;
}

/* Tables */
body table,
body .wp-block-table table {
  color: var(--shcc-text) !important;
}

body table th,
body table td,
body .wp-block-table th,
body .wp-block-table td {
  border-color: rgba(255, 255, 255, 0.45) !important;
  color: var(--shcc-text) !important;
}

body table thead th,
body .wp-block-table thead th {
  background: rgba(0, 0, 0, 0.55) !important;
}

/* Separators / HR */
body hr,
body .wp-block-separator {
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Images stay clear; captions glass */
body .wp-block-image figcaption,
body .wp-block-gallery figcaption,
body .wp-block-video figcaption,
body .wp-block-embed figcaption {
  background: var(--shcc-glass);
  border: 1px solid var(--shcc-border);
  border-radius: 6px;
  color: var(--shcc-text) !important;
  padding: 6px 10px;
}

/* Pagination */
body .wp-block-query-pagination a,
body .nav-links a,
body .page-numbers {
  color: var(--shcc-text) !important;
  background: var(--shcc-glass);
  border: 1px solid var(--shcc-border);
  border-radius: 6px;
  padding: 4px 10px;
}

body .page-numbers.current {
  background: linear-gradient(90deg, var(--shcc-accent), var(--shcc-accent-2));
  color: #000 !important;
}

/* Notices / messages from core */
body .wp-block-post-comments-form .comment-reply-title,
body .logged-in-as,
body .must-log-in {
  color: var(--shcc-text) !important;
}

/* Yoast / misc widgets often inject white boxes */
body .yoast-breadcrumbs,
body .breadcrumbs {
  color: var(--shcc-text) !important;
}

/* Events calendar leftovers if still active */
body .tribe-events,
body .tribe-common {
  color: var(--shcc-text) !important;
}

body .tribe-events-calendar-month,
body .tribe-events-calendar-list,
body .tribe-events-view {
  background: var(--shcc-glass) !important;
  border: 1px solid var(--shcc-border);
  border-radius: var(--shcc-radius);
  color: var(--shcc-text) !important;
}

/* Keep admin bar normal */
#wpadminbar,
#wpadminbar * {
  color: initial;
}

#wpadminbar a {
  color: #c3c4c7 !important;
}
