/* core-ui.css */

/* =========================================
   Base tokens
========================================= */
:root {
  --bg-white: #fff;
  --bg-gray: #f5f5f5;
  --shadow-1: 0 2px 4px rgba(0,0,0,.1);
  --shadow-2: 0 2px 6px rgba(0,0,0,.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 9px;
}

/* =========================================
   Generic containers (shared styles)
========================================= */
.post-container,
.small-container,
.large-container,
#email-form-container {
  background: var(--bg-white);
  box-shadow: var(--shadow-1);
  border-radius: var(--radius-lg);
}

.post-container,
.large-container {
  width: 100%;
  max-width: 100%;
  padding: 15px;
  margin: 20px auto;
}

.small-container {
  max-width: 800px;
  margin: 20px auto 400px;
  padding: 5px 30px;
}

/* Keep this specific override (different radius + blue bg) */
.large-container {
  border-radius: var(--radius-sm);
  background-color: blue;
}

/* Fullscreen blue overlay for email-only views (NOT the dashboard modal) */
.large-container-email-only {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: blue;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  z-index: 9999;
  overflow: auto;
  padding: 20px;
}

/* Address + map box */
.address-map-container {
  margin: 60px 0;
  padding: 15px;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
}

/* Email form container + layout */
#email-form-container {
  box-shadow: var(--shadow-2);
  border-radius: var(--radius-sm);
}
#email-form-container form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================================
   Offer cards (grid + flip)
========================================= */
.offer-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.offer-card {
  position: relative;
  flex: 1 1 calc(33.33% - 16px);
  max-width: calc(33.33% - 16px);
  height: 400px;
  display: flex;
  flex-direction: column;
  background-color: #f1f1f1;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-1);
  box-sizing: border-box;
  overflow: hidden;
}

.offer-card-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .8s;
}

.offer-card.flipped .offer-card-inner {
  transform: rotateY(180deg);
}

/* Faces (front/back) share most props */
.offer-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: inherit;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.offer-card-front {
  background-color: var(--bg-white);
  z-index: 2;
}

.offer-card-back {
  background-color: var(--bg-white);
  padding: 16px;
  justify-content: flex-start;
  box-shadow: var(--shadow-1);
  transform: rotateY(180deg);
  z-index: 1;
}

.offer-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.offer-card h3,
.offer-card p,
.offer-card-back h3 {
  margin-bottom: 16px;
  text-align: center;
}

.offer-card-back .giveaway-details,
.offer-card-back p {
  text-align: left;
  margin-bottom: 16px;
  line-height: 1.6;
  font-size: 14px;
}

/* Close buttons (shared for cards) */
.close-card {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-1);
  transition: background-color .3s, color .3s;
}
.close-card:hover {
  background: #f0f0f0;
  color: #333;
}

/* =========================================
   Business cards
========================================= */
.business-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 20px 0;
}

.business-card {
  display: inline-block;
  width: 333px;
  margin: 10px;
  padding: 10px;
  text-align: center;
  background: var(--bg-white);
  border: 1px solid #ddd;
  border-radius: 10px;
  transition: transform .2s, box-shadow .2s;
}

.business-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
}

.business-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 10px;
}

.business-card h3 {
  font-size: 1.4em;
  margin: 10px 0;
  color: #333;
}

.business-card p {
  font-size: 1em;
  color: #777;
  margin-bottom: 15px;
}

.business-card-link {
  display: inline-block;
  padding: 10px 20px;
  background-color: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color .3s ease;
}

.business-card-link:hover {
  background-color: #005177;
}

/* =========================================
   Misc
========================================= */
#calendar {
  width: 100%;
  margin: 0 auto;
  table-layout: fixed;
  border-collapse: collapse;
}

.calendar-available {
  text-align: center;
  padding: 10px;
}

.confirmation-message,
.engagement-confirmed-message {
  color: red;
  font-weight: bold;
  line-height: 1.3;
  margin-top: 10px;
  text-align: center;
}

.engagement-confirmation-box {
  padding: 20px;
  background: #e6ffe6;
  border: 1px solid #b3ffb3;
  color: #1b4f1b;
  text-align: center;
}

#ll-email-only-form .email-input {
  margin-bottom: 12px;
  display: block;
}

.business-logo img { max-width: 250px; height: auto; }
.featured-image img { max-width: 500px; height: auto; }

.logo-container, .images-container { margin-bottom: 15px; }
.logo-controls, .images-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}
.logo-preview, .images-gallery { margin-top: 5px; }
.logo-preview { position: relative; display: inline-block; }

.ll-gallery-item { position: relative; display: inline-block; }
.ll-gallery-item img { max-width: 100px; height: auto; }
.ll-remove-image {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  cursor: pointer;
  font-weight: bold;
}

.image-gallery { text-align: center; margin-top: 20px; }
.image-gallery img {
  display: inline-block;
  border: 2px solid #ddd;
  border-radius: 5px;
  transition: transform .3s ease, border-color .3s ease;
}
.image-gallery img:hover { transform: scale(1.05); border-color: #aaa; }

.main { text-align: center; }
