/* ==========================================================================
   ONE BRIEF. ENDLESS CREATIVES.
   High-converting generative AI campaign matrix showcase for AdShot AI
   ========================================================================== */

.one-brief-section {
  padding: 80px 0 90px;
  background: radial-gradient(circle at 50% 15%, rgba(99, 102, 241, 0.04) 0%, transparent 65%),
              radial-gradient(circle at 90% 85%, rgba(236, 72, 153, 0.03) 0%, transparent 55%),
              #FAFAFC;
  position: relative;
  overflow: hidden;
}

/* Subtle background architectural dot grid */
.one-brief-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(148, 163, 184, 0.16) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.one-brief-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* Header */
.ob-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 32px auto;
}

.ob-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6366F1;
  margin-bottom: 12px;
}

.ob-title {
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: #0F172A;
  margin: 0 0 16px 0;
}

.ob-gradient-text {
  background: linear-gradient(90deg, #4338CA 0%, #6366F1 28%, #A855F7 58%, #EC4899 82%, #F43F5E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.ob-subtitle {
  font-size: 16px;
  font-weight: 500;
  color: #64748B;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 660px;
}

/* Generating Status Pill */
.ob-status-pill-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 34px;
}

.ob-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  padding: 8px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.06);
  font-size: 13.5px;
  font-weight: 600;
  color: #1E293B;
  transition: all 0.3s ease;
}

.ob-status-icon {
  color: #8B5CF6;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.ob-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #E2E8F0;
  border-top-color: #8B5CF6;
  border-right-color: #EC4899;
  animation: obSpin 0.9s linear infinite;
}

@keyframes obSpin {
  100% { transform: rotate(360deg); }
}

/* Main Dashboard Canvas */
.ob-dashboard {
  background: #FFFFFF;
  border-radius: 28px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 
    0 24px 60px -15px rgba(15, 23, 42, 0.08),
    0 6px 18px -4px rgba(15, 23, 42, 0.03);
  padding: 24px;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 24px;
  align-items: stretch;
}

/* Left Column: Your Brief */
.ob-brief-card {
  background: #F8FAFC;
  border: 1px solid #EEF2F6;
  border-radius: 20px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.ob-brief-heading {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
  margin: 0 0 14px 0;
}

.ob-prompt-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
  font-family: inherit;
  resize: none;
  width: 100%;
  box-sizing: border-box;
  min-height: 100px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 16px;
}

.ob-prompt-box:focus {
  outline: none;
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.ob-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.ob-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ob-field-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748B;
  text-transform: capitalize;
}

.ob-select-pill {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.ob-select-pill:hover {
  border-color: #CBD5E1;
  background: #FAFAFA;
}

.ob-product-thumb {
  width: 26px;
  height: 26px;
  object-fit: cover;
  background: #F1F5F9;
  border-radius: 6px;
  padding: 0;
  display: block;
}

.ob-field-icon {
  font-size: 13px;
  width: 18px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ob-select-val {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ob-chevron {
  color: #94A3B8;
  font-size: 11px;
  font-weight: 700;
}

.ob-generate-btn {
  margin-top: auto;
  background: #0F172A;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.2);
}

.ob-generate-btn:hover {
  background: #1E293B;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(99, 102, 241, 0.3);
}

.ob-generate-btn:active {
  transform: translateY(0);
}

/* Right Column: 5 x 3 Creative Variations Grid */
.ob-grid-wrap {
  display: flex;
  flex-direction: column;
}

.ob-variations-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  height: 100%;
}

.ob-tile {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #F1F5F9;
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.ob-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.ob-tile:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 14px 30px -6px rgba(15, 23, 42, 0.16);
  border-color: #818CF8;
  z-index: 10;
}

.ob-tile:hover img {
  transform: scale(1.06);
}

.ob-tile-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.25s ease;
  pointer-events: none;
}

.ob-tile:hover .ob-tile-badge {
  opacity: 1;
  transform: translateY(0);
}

/* Replay Pill Button */
.ob-replay-pill {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.ob-replay-pill:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

.ob-prompt-container {
  position: relative;
  width: 100%;
}

.ob-typing-caret {
  display: inline-block;
  width: 2px;
  height: 15px;
  background-color: #6366F1;
  vertical-align: middle;
  animation: obCaretBlink 0.7s infinite;
  position: absolute;
  pointer-events: none;
}

@keyframes obCaretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Shimmer animation during regeneration */
.ob-tile.shimmering {
  position: relative;
}

.ob-tile.shimmering::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
  animation: obShimmer 1s infinite;
  z-index: 5;
}

/* Dynamic Generation Reveal Animation */
.ob-tile.revealing {
  animation: obTilePopIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes obTilePopIn {
  0% {
    transform: scale(0.85);
    opacity: 0.4;
    filter: brightness(1.5) blur(2px);
  }
  60% {
    transform: scale(1.05);
    filter: brightness(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1) blur(0);
  }
}

@keyframes obShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */
@media (max-width: 1080px) {
  .ob-dashboard {
    grid-template-columns: 260px 1fr;
    padding: 20px;
    gap: 16px;
  }
  .ob-variations-grid {
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .ob-dashboard {
    grid-template-columns: 1fr;
  }
  .ob-brief-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .ob-brief-heading,
  .ob-prompt-box,
  .ob-generate-btn {
    grid-column: span 2;
  }
  .ob-variations-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .one-brief-section {
    padding: 56px 0 68px;
  }
  .ob-header {
    margin-bottom: 24px;
  }
  .ob-title {
    font-size: clamp(26px, 6.8vw, 36px);
  }
  .ob-subtitle {
    font-size: 14.5px;
    padding: 0 10px;
  }
  .ob-status-pill-wrap {
    margin-bottom: 24px;
  }
  .ob-status-pill {
    padding: 6px 14px;
    font-size: 12px;
  }
  .ob-dashboard {
    padding: 16px;
    border-radius: 20px;
  }
  .ob-brief-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .ob-brief-heading,
  .ob-prompt-box,
  .ob-generate-btn {
    grid-column: span 1;
  }
  .ob-variations-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

@media (max-width: 440px) {
  .ob-variations-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .ob-tile {
    border-radius: 10px;
  }
}
