/* ==========================================================================
   KFC 320x480 Ad Unit Stylesheet
   Brand Theme: KFC Red (#e4002b), White, Black, Clean Modern Typography
   ========================================================================== */

:root {
  /* Dimensions (Default 320x480, dynamically overridable by config.js) */
  --kfc-width: 320px;
  --kfc-height: 480px;

  /* Theme Colors */
  --kfc-red: #e4002b;
  --kfc-red-hover: #c40024;
  --kfc-red-active: #a5001e;
  --kfc-white: #ffffff;
  --kfc-dark: #111111;
  --kfc-footer-bg: #ffffff;
  --kfc-border: #e0e0e0;

  /* Button Variables */
  --kfc-btn-bg: #e4002b;
  --kfc-btn-text: #ffffff;
  --kfc-btn-radius: 6px;

  /* Typography */
  --kfc-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f0f2f5;
  font-family: var(--kfc-font-family);
  -webkit-font-smoothing: antialiased;
}

/* Outer Ad Unit Container */
.kfc-ad-unit {
  width: var(--kfc-width);
  height: var(--kfc-height);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--kfc-footer-bg);
  border: 1px solid var(--kfc-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* KFC Signature 3-Stripe Bar (Red - White - Red) */
.kfc-stripe-bar {
  display: flex;
  height: 4px;
  width: 100%;
  flex-shrink: 0;
  z-index: 10;
}

.kfc-stripe-bar.hidden {
  display: none;
}

.kfc-stripe {
  flex: 1;
  height: 100%;
}

.kfc-stripe.red {
  background-color: var(--kfc-red);
}

.kfc-stripe.white {
  background-color: var(--kfc-white);
}

/* Static Image / Creative Area */
.kfc-creative-container {
  flex: 0 0 auto;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kfc-image-link {
  display: block;
  width: 100%;
  text-decoration: none;
  cursor: pointer;
}

.kfc-ad-img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
  object-position: center top;
  transition: transform 0.35s cubic-bezier(0.2, 0, 0.1, 1);
}

.kfc-image-link:hover .kfc-ad-img {
  transform: scale(1.02);
}

/* Bottom Action / Footer Area */
.kfc-footer {
  flex: 1;
  min-height: 56px;
  background-color: var(--kfc-footer-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  z-index: 10;
}

/* "Get Direction" KFC Call-To-Action Button */
.kfc-btn-direction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  background-color: var(--kfc-btn-bg);
  color: var(--kfc-btn-text);
  text-decoration: none;
  font-family: var(--kfc-font-family);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-radius: var(--kfc-btn-radius);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(228, 0, 43, 0.28);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.kfc-btn-direction:hover {
  background-color: var(--kfc-red-hover);
  box-shadow: 0 4px 14px rgba(228, 0, 43, 0.42);
  transform: translateY(-1px);
}

.kfc-btn-direction:active {
  background-color: var(--kfc-red-active);
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 1px 4px rgba(228, 0, 43, 0.25);
}

.kfc-btn-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.kfc-btn-direction:hover .kfc-btn-icon {
  transform: translateX(1px);
}

.kfc-btn-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
