/* Instagram Caption Generator — tool-specific styles */

.tool-shell {
  background: #05070a;
  background-image: none;
  min-height: calc(100vh - var(--header-h, 72px));
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(2rem, 5vw, 3.5rem) var(--page-pad-inline, 1.25rem);
}

.tool-card {
  width: 100%;
  max-width: 720px;
  background: #111a2e;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(96, 165, 250, 0.06);
  overflow: hidden;
}

.tool-card__header {
  padding: 1.75rem 2rem 1.5rem;
}

.tool-card__eyebrow {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #60a5fa;
  margin: 0 0 0.5rem;
}

.tool-card__title {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  color: #f1f5f9;
}

.tool-card__subtitle {
  color: #64748b;
  font-size: 0.9375rem;
  margin: 0;
}

/* Platform tabs */
.platform-tabs {
  display: flex;
  gap: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 3px;
  margin: 0 2rem 1.5rem;
}

.platform-tab {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  text-align: center;
}

.platform-tab.is-active {
  background: #1d4ed8;
  color: #f1f5f9;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.4);
}

.platform-tab:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
}

.tool-body {
  padding: 0 2rem 2rem;
}

/* Labels and inputs */
.calc-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.gen-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 10px;
  color: #f1f5f9;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 1rem;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.gen-input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.5);
}

.gen-input::placeholder {
  color: #475569;
}

/* Tone pills */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.style-pill {
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.style-pill.is-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.style-pill:not(.is-active):hover {
  border-color: rgba(96, 165, 250, 0.4);
  color: #cbd5e1;
}

/* Generate button */
.gen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.18s;
}

.gen-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

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

/* Results */
.results-area {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.results-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  border: 1px dashed rgba(96, 165, 250, 0.15);
  border-radius: 12px;
  color: #475569;
  font-size: 0.9375rem;
  text-align: center;
}

.caption-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  transition: border-color 0.15s;
}

.caption-card:hover {
  border-color: rgba(96, 165, 250, 0.28);
}

.caption-card__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
  margin: 0 0 0.6rem;
}

.caption-card__text {
  color: #e2e8f0;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 0.75rem;
  white-space: pre-wrap;
}

.caption-card__hashtags {
  font-size: 0.8125rem;
  color: #60a5fa;
  line-height: 1.5;
  margin: 0 0 0.875rem;
  word-break: break-word;
}

.caption-card__footer {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 6px;
  background: transparent;
  color: #60a5fa;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.copy-btn:hover {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.45);
}

.copy-btn.copied {
  border-color: rgba(74, 222, 128, 0.4);
  color: #4ade80;
}

.copy-btn--secondary {
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.25);
}

.copy-btn--secondary:hover {
  color: #94a3b8;
  background: rgba(100, 116, 139, 0.08);
}

/* Spacing helpers */
.field + .field {
  margin-top: 1.25rem;
}

.field:first-child {
  margin-top: 0;
}

@media (max-width: 560px) {
  .tool-card__header {
    padding: 1.25rem 1.25rem 1.25rem;
  }
  .platform-tabs {
    margin: 0 1.25rem 1.25rem;
  }
  .tool-body {
    padding: 0 1.25rem 1.5rem;
  }
}
