/* Platter Builder Styles */

/* Mini Cookie Cards */
.platter-mini-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
  height: 100%;
}

.platter-mini-card:hover {
  transform: translateY(-2px);
}

.platter-card-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

.platter-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.platter-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

.light-theme .platter-card-title {
  font-weight: 700;
}

/* Flavor count display */
.platter-flavor-count {
  font-size: 1.25rem;
  font-weight: 700;
  min-height: 1.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dark-theme .platter-flavor-count {
  color: #FFADE8; /* Site light pink for dark theme */
}

.light-theme .platter-flavor-count {
  color: #C71585; /* Dark pink for light theme */
}

/* Button row */
.platter-button-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  margin-top: auto;
}

.platter-btn {
  flex: 1;
  padding: 0.5rem;
  border: 2px solid;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

/* Add button - inverted theme */
.dark-theme .platter-btn-add {
  background: transparent;
  border-color: #00FFFF;
  color: #00FFFF;
}

.dark-theme .platter-btn-add:hover:not(:disabled) {
  background: rgba(0, 255, 255, 0.1);
}

.dark-theme .platter-btn-add:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.light-theme .platter-btn-add {
  background: #00FFFF;
  border-color: #00FFFF;
  color: #000;
}

.light-theme .platter-btn-add:hover:not(:disabled) {
  background: #00CED1;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.light-theme .platter-btn-add:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Remove button - orange theme */
.dark-theme .platter-btn-remove {
  background: transparent;
  border-color: #FF8C42;
  color: #FF8C42;
}

.dark-theme .platter-btn-remove:hover:not(:disabled) {
  background: rgba(255, 140, 66, 0.1);
}

.dark-theme .platter-btn-remove:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.light-theme .platter-btn-remove {
  background: transparent;
  border-color: #FF8C42;
  color: #FF8C42;
}

.light-theme .platter-btn-remove:hover:not(:disabled) {
  background: rgba(255, 140, 66, 0.1);
}

.light-theme .platter-btn-remove:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Mock Box Layouts */
.mock-box {
  position: relative;
  display: grid;
  gap: 0.5rem;
}

.mock-box-grand {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 100%;
  max-width: 350px;
  aspect-ratio: 4 / 3;
}

/* Social platter: CSS grid cross/plus pattern - wings attach to center */
.mock-box-social {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 0.25rem;
  width: 200px;
  height: 200px;
  position: relative;
}

/* Center slot: row 2, col 2 */
.mock-box-social .mock-slot:nth-child(1) {
  grid-column: 2;
  grid-row: 2;
}

/* Top slot: row 1, col 2 */
.mock-box-social .mock-slot:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

/* Bottom slot: row 3, col 2 */
.mock-box-social .mock-slot:nth-child(3) {
  grid-column: 2;
  grid-row: 3;
}

/* Left slot: row 2, col 1 */
.mock-box-social .mock-slot:nth-child(4) {
  grid-column: 1;
  grid-row: 2;
}

/* Right slot: row 2, col 3 */
.mock-box-social .mock-slot:nth-child(5) {
  grid-column: 3;
  grid-row: 2;
}

.mock-slot {
  background: transparent;
  border: 2px solid;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: border-color 0.3s, transform 0.15s ease, font-size 0.15s ease;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
}

.mock-slot.filled {
  background: transparent;
}

/* Cookie lands: slot jumps to fit emoji with no padding */
.mock-slot.cookie-landing {
  transform: scale(1.15);
  font-size: 2.4rem;
}

/* Animations */
@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Theme Variables */
:root,
.dark-theme {
  --card-bg: #2A1F1A;
  --border-color: #4A3A2A;
}

.light-theme {
  --card-bg: #FFFFFF;
  --border-color: #D4C4B4;
}

/* Confirmation Modal */
.platter-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.platter-confirm-modal.active {
  opacity: 1;
}

.platter-confirm-content {
  background: var(--card-bg);
  border: 2px solid #00FFFF;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.platter-confirm-content h3 {
  color: #00FFFF;
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
}

.platter-confirm-content p {
  color: var(--text-primary);
  margin: 0 0 1.5rem 0;
}

.platter-confirm-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.platter-confirm-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.platter-confirm-yes {
  background: #FF6B6B;
  border-color: #FF6B6B;
  color: #FFF;
}

.platter-confirm-yes:hover {
  background: #E65555;
}

.platter-confirm-no {
  background: transparent;
  border-color: #00FFFF;
  color: #00FFFF;
}

.platter-confirm-no:hover {
  background: rgba(0, 255, 255, 0.1);
}

/* Mobile card layout: | image | title(2-row,left) | count(centred) | qty-btns(right) | */
.platter-mobile-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  min-height: 0;
}

/* Image: kept at current size */
.platter-mobile-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  align-self: center;
}

.platter-mobile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Body wrapper removed - title now a direct flex child */
.platter-mobile-body {
  display: contents;
}

/* Title: flex-child, takes remaining space, left-aligned, 2-row clamp */
.platter-mobile-title {
  flex: 1;
  min-width: 0;
  font-size: 1rem; /* +80% original 0.8rem, then −30% = 1rem */
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
  padding-left: 0.15rem;
  align-self: center;
}

/* Count: centred between title and qty-btns */
.platter-mobile-count {
  font-size: 1.5rem;
  font-weight: 700;
  min-height: auto;
  min-width: 1.6rem;
  text-align: center;
  line-height: 1;
  flex-shrink: 0;
  align-self: center;
}

/* Buttons column: − then + stacked vertically, right-aligned */
.platter-mobile-btns {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
  flex-shrink: 0;
}

/* Buttons */
.platter-btn-mobile {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border-radius: 6px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* Mobile Adjustments */
@media (max-width: 767px) {
  .platter-card-image {
    width: 80px;
    height: 80px;
  }

  .platter-card-title {
    font-size: 0.75rem;
  }

  .mock-box-grand {
    max-width: 200px;
  }

  .mock-box-social {
    width: 150px;
    height: 150px;
  }

  .mock-slot {
    font-size: 1.5rem;
  }

  .platter-confirm-content {
    margin: 1rem;
    padding: 1.5rem;
  }
}
