/* Custom Font */
@font-face {
  font-family: 'MeathFLF';
  src: url('/assets/fonts/meath/MeathFLF.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Keyframes for selection flash animation */
@keyframes flash {
  0% { box-shadow: 0 0 0px gold; }
  50% { box-shadow: 0 0 10px gold; }
  100% { box-shadow: 0 0 0px gold; }
}

/* Global body styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Prevent horizontal scroll */
  background-color: #f4f4f9;
  color: #333;
  background-image: url('/assets/images/Background_72%20dpi.png');
  background-size: cover;
  background-repeat: no-repeat;
}

/* GMPage container style */
.container {
  max-width: 800px;
  margin: auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ParticipantPage: dark overlay spans the full viewport */
.participant-page {
  width: 100vw;
  min-height: 100vh;
  background-color: rgba(0, 0, 0, 0.7); /* Dark overlay */
  color: #fff;
  position: relative;
  padding: 80px 0; /* Top and bottom spacing */
}

/* Fixed Header */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: #222;
  z-index: 1000;
  padding: 0 20px;
  box-sizing: border-box;
  border-bottom: 1px solid gold;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header title (centered) */
.fixed-header h1 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 24px;
  color: #fff;
  font-family: 'MeathFLF', sans-serif;
}

/* New style for the header title button */
.header-title-button {
  background: none;
  border: none;
  color: inherit;
  font-family: 'MeathFLF', sans-serif;
  font-size: inherit;
  cursor: pointer;
}

/* Ensure no visible style changes when clicked or focused */
.header-title-button:active,
.header-title-button:focus {
  outline: none;
  background-color: transparent;
  border: none;
}

/* Left and right header content (if needed) */
.left-header-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.right-header-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.fixed-header .header-logo {
  height: 50px;
}

.fixed-header .header-link {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.fixed-header .header-link img.header-deck {
  height: 50px;
  margin-right: 8px;
}

@media (max-width: 500px) {
  .header-link-text {
    display: none;
  }
}

/* Fixed Footer – Matching Header Layout */
.fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 105px; /* Increased by 50% (from 70px to 105px) */
  background-color: #222;
  padding: 0 30px;
  box-sizing: border-box;
  z-index: 1000;
  border-top: 1px solid gold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left,
.footer-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.footer-right {
  justify-content: flex-end;
}

/* Contact Link Styling */
.contact-link {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.full-contact {
  display: inline;
}
.short-contact {
  display: none;
}
@media (max-width: 600px) {
  .full-contact {
    display: none;
  }
  .short-contact {
    display: inline;
  }
}

/* Instructions Block */
.instructions {
  width: 50%;
  min-width: 300px;
  min-height: 45vh; /* always at least half the screen height */
  margin: 20px auto;
  text-align: center;
  line-height: 1.5;
  border: 2px solid gold;
  border-radius: 8px;
  padding: 10px;
  background-color: rgba(39, 55, 107, 0.8); /* blue translucent background */
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Style for welcome header inside the instructions box */
.welcome-header {
  font-size: 44px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

/* Set the paragraph font size in the instructions box */
.instructions p {
  font-size: 24px;
}

/* Meath text styling */
.meath-text {
  font-family: 'MeathFLF', sans-serif;
  font-size: 36px;
  color: gold;
}

/* Button styles */
button {
  padding: 10px 15px;
  margin: 5px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}
button:hover {
  background-color: #0056b3;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Success and error messages */
.success {
  color: green;
}
.error {
  color: red;
}

/* Choices Container */
.choices-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 20px;
}

/* Common card dimensions */
.card-dimensions {
  width: 150px;
  height: 200px;
}

/* Predefined choice cards */
.choice-button {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  margin: 5px;
  border: 2px solid transparent;
  border-radius: 8px;
  background-image: url('/assets/images/Poker%20Card%20Design_template.jpg');
  background-size: cover;
  background-position: center;
  transition: border 0.2s;
  text-align: center;
  color: #fff !important;
  font-weight: bold;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  cursor: pointer;
}
.choice-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 0;
  border-radius: 8px;
  transition: opacity 0.2s;
}
.choice-button span.card-front {
  position: relative;
  z-index: 1;
  background-color: rgba(0,0,0,0);
}
.choice-button:hover {
  border: 2px solid gold;
}
.choice-button.selected::before {
  opacity: 0.4;
}
.choice-button.selected {
  animation: flash 0.5s ease-out;
}
.choice-button.disabled {
    opacity: 0.8;    /* darker, “faded” look */
    cursor: default; /* arrow, not the “no” symbol */
}

/* Custom Card styling */
.custom-card {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 5px;
  border: 2px solid transparent;
  border-radius: 8px;
  background-image: url('/assets/images/Poker%20Card%20Design_template.jpg');
  background-size: cover;
  background-position: center;
  transition: border 0.2s, background 0.2s;
  cursor: pointer;
  overflow: hidden;
}
.custom-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 0;
  border-radius: 8px;
  transition: opacity 0.2s;
}
.custom-card.blank {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
.custom-card.blank::before {
  background: rgba(0, 0, 0, 0.9);
}
.custom-card.selected::before {
  opacity: 0;
}
.custom-card.selected {
  border: 4px solid #3CB371;
}
.custom-card.selected::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(60,179,113,0.2);
  border-radius: inherit;
  z-index: 1;
  pointer-events: none;
}
.custom-card > *,
.choice-button > * {
  position: relative;
  z-index: 2;
}
.card-front {
  background-color: rgba(0,0,0,0);
  color: #fff;
}

/* Custom Card Modal */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.custom-modal {
  background: #333;
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  border: 2px solid grey;
}
.custom-modal input {
  width: 80%;
  padding: 8px;
  margin: 10px 0;
  font-size: 16px;
  border: 2px solid gold;
  background: transparent;
  color: #fff;
}
.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.custom-modal button {
  padding: 8px 12px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.custom-modal button.ok-button {
  background-color: #007bff;
  color: #fff;
}
.custom-modal button.cancel-button {
  background-color: #ccc;
  color: #333;
}

/* GMPage Specific */
.gm-page {
  min-height: 100vh;
  background: url('/assets/images/Background_72%20dpi.png');
  background-size: cover;
  background-repeat: no-repeat;
  color: #333;
  position: relative;
  padding: 20px;
}

.session-section {
  max-width: 800px;
  margin: 0 auto;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.session-card {
  background: rgba(39, 55, 107, 0.9);
  border: 2px solid gold;
  border-radius: 12px;
  padding: 16px 20px;
  color: #fff;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.session-card.clickable {
  cursor: pointer;
}

.session-card.clickable:hover {
  transform: translateY(-2px);
  border-color: #fff;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.4);
}

.session-card.inactive {
  opacity: 0.65;
  cursor: default;
}

.session-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.session-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-card-title {
  font-size: 18px;
  font-weight: 600;
}

.session-card-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.session-status {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.session-status.active {
  background: rgba(60, 179, 113, 0.15);
  border-color: #3CB371;
  color: #3CB371;
}

.session-status.closed {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.85);
}

.session-card-action {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: gold;
}

.session-delete-button {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: color 0.15s ease, background 0.15s ease;
}

.session-delete-button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ff6b6b;
}

.session-delete-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.session-delete-button:focus-visible {
  outline: 2px solid gold;
  outline-offset: 2px;
}

.copy-success {
  margin-top: 30px;
  font-size: 24px;
  color: #17034e;
}

/* Disabled state for custom cards */
.custom-card.disabled {
    opacity: 0.8;    /* match normal cards’ faded look */
    cursor: default; /* non-interactive cursor */
}