/* Culinary Logic Puzzle - Main Styles */
/* Removing Google Fonts import to prevent loading errors */
/* @import url('https://fonts.googleapis.com/css2?family=Cooper+Black&family=Poppins:wght@400;500;600&family=Quicksand:wght@500;700&display=swap'); */

/* Custom Font Declarations */
/* Title font: hoss-round-slab from Adobe Fonts (Typekit) */
/* Available weights: 300, 400, 500, 600, 700, 800, 900 */
/* Currently using weight 600 for titles */
@font-face {
  font-family: 'ComboMealTitle';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  /* Using Adobe Fonts - loaded via Typekit link in index.html */
  src: local('hoss-round-slab');
}

@font-face {
  font-family: 'ComboMealTitleMedium';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  /* Hoss Round Slab Medium - using Adobe Fonts via Typekit */
  src: local('hoss-round-slab');
}

@font-face {
  font-family: 'ComboMealTitleBold';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  /* Hoss Round Slab Bold - using Adobe Fonts via Typekit */
  src: local('hoss-round-slab');
}

@font-face {
  font-family: 'ComboMealBody';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  /* Onest Regular - body text font */
  src: url('../fonts/Onest/static/Onest-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'ComboMealButton';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  /* Onest Bold - button and bold text font */
  src: url('../fonts/Onest/static/Onest-Bold.ttf') format('truetype');
}

:root {
  /* 70s-inspired color palette */
  --color-background: #f8f5f2;      /* Cream background */
  --color-primary: #D5D83F;         /* Pear (source of truth is js/design-system.js) */
  --color-secondary: #FF8848;       /* Carrot (source of truth is js/design-system.js) */
  --color-tertiary: #FFFFF5;        /* Buttercream */
  --color-accent: #3B5D6D;          /* Blueberry */
  --color-text: #3D0F00;            /* Cocoa for text */
  
  /* Vessel colors */
  --color-vessel-base: #F9F5EB;     /* Cream white for base ingredients */
  --color-vessel-yellow: #FFFFF5;   /* Buttercream for partial combinations */
  --color-vessel-green: #D5D83F;    /* Pear for complete combinations */
  --color-vessel-hint: #FECF49;     /* Squash for hint vessels */
  
  /* Typography - Custom font families */
  --font-title: 'hoss-round-slab', 'ComboMealTitle', sans-serif;
  --font-body: 'ComboMealBody', sans-serif;
  --font-button: 'ComboMealButton', sans-serif;
}
/* Consistent focus styles for DOM buttons/links */
button:focus,
button:focus-visible,
.terms-modal-close:focus,
.terms-modal-close:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

a:focus,
a:focus-visible,
input:focus,
textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: var(--font-body);
  background-color: var(--color-background);
  color: var(--color-text);
}

canvas {
  display: block;
}

/* Prevent native drag-to-copy behavior on the game canvas (Firefox/macOS) */
canvas {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
}

/* Button styles */
button {
  font-family: var(--font-button);
  font-weight: 700;
  background-color: var(--color-primary);
  color: white;
  border: 2px solid transparent;
  border-radius: 5px;
  padding: 12px 20px;
  min-height: 40px;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background-color: var(--color-secondary);
  transform: scale(1.05);
}

/* Loading screen */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-color: var(--color-background);
}

.loading-screen h1 {
  font-family: var(--font-title);
  font-weight: 600; /* hoss-round-slab weight 600 */
  color: var(--color-primary);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.loading-screen p {
  font-family: var(--font-body);
  color: var(--color-text);
  font-size: 1.2rem;
}

/* Terms & Conditions Modal */
.terms-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
}

.terms-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.terms-modal-content {
  position: relative;
  background: white;
  border: 3px solid var(--color-primary);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.terms-modal-header {
  padding: 24px 24px 16px;
  border-bottom: 2px solid var(--color-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-background);
  border-radius: 16px 16px 0 0;
}

.terms-modal-header h2 {
  font-family: var(--font-title);
  font-weight: 600; /* hoss-round-slab weight 600 */
  color: var(--color-primary);
  margin: 0;
  font-size: 1.4rem;
}

.terms-modal-close {
  background: var(--color-secondary);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: bold;
  line-height: 1;
  box-shadow: none;
  border: 2px solid var(--color-secondary);
}

.terms-modal-close:hover {
  background: #c55530;
  transform: scale(1.02);
}

.terms-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text);
  -webkit-overflow-scrolling: touch; /* smooth iOS momentum scroll */
  overscroll-behavior: contain; /* prevent body scroll chaining */
  touch-action: auto; /* allow vertical scroll gestures */
}

.terms-modal-body h3 {
  font-family: var(--font-title);
  font-weight: 600; /* hoss-round-slab weight 600 */
  color: var(--color-primary);
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  text-align: center;
}

.terms-modal-body h4 {
  color: var(--color-secondary);
  margin: 20px 0 8px 0;
  font-size: 1rem;
  font-weight: bold;
}

.terms-modal-body p {
  margin: 8px 0 12px 0;
  text-align: left;
}

.terms-modal-body ul {
  margin: 8px 0 12px 20px;
  padding: 0;
}

.terms-modal-body li {
  margin: 5px 0;
  list-style-type: disc;
}

.terms-modal-body em {
  color: #666;
  font-style: italic;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .terms-modal-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .terms-modal-header {
    padding: 15px 20px 10px;
  }
  
  .terms-modal-header h2 {
    font-size: 1.2rem;
  }
  
  .terms-modal-close {
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 1.3rem;
  }
  
  .terms-modal-body {
    padding: 20px;
    font-size: 0.85rem;
  }
  
  .terms-modal-body h4 {
    font-size: 0.95rem;
  }
}

/* Smooth animations */
.terms-modal {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.terms-modal.show {
  opacity: 1;
}

.terms-modal-content {
  transform: scale(0.9) translateY(-20px);
  transition: transform 0.3s ease;
}

.terms-modal.show .terms-modal-content {
  transform: scale(1) translateY(0);
} 