/*
 * Text Monster AI Ideas — Frontend Styles (Lite)
 * Minimal CSS only: layout, blur, lock overlay.
 * All colors/fonts inherited from theme.
 *
 * @package TextMonsterAIIdeas
 */

/* ── Wrap ──────────────────────────────────────────────────── */
.tmg-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.tmg-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .6;
  margin-bottom: 8px;
}

.tmg-title  { margin-bottom: 8px; }
.tmg-subtitle { margin-bottom: 24px; opacity: .8; }

/* ── Form ──────────────────────────────────────────────────── */
.tmg-form {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 28px;
}

.tmg-field { margin-bottom: 16px; }

.tmg-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 5px;
  opacity: .7;
}

.tmg-field input,
.tmg-field select {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 4px;
  font-family: inherit;
  font-size: inherit;
  background: transparent;
  box-sizing: border-box;
}

.tmg-field input:focus,
.tmg-field select:focus {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.tmg-hint {
  font-size: 12px;
  opacity: .6;
  margin-top: 3px;
}

.tmg-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Error ─────────────────────────────────────────────────── */
.tmg-error {
  display: none;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 12px;
  border: 1px solid #b91c1c;
  color: #b91c1c;
  background: #fef2f2;
}
.tmg-error.active { display: block; }

/* ── Button ────────────────────────────────────────────────── */
.tmg-btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 8px;
  border: none;
  background-color: #2271b1; /* WordPress primary blue color */
  color: #ffffff;            /* Force white text for readability */
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color 0.15s ease-in-out;
}

.tmg-btn:hover {
  background-color: #135e96; /* Darker blue on hover */
  color: #ffffff;
}

.tmg-btn:disabled { 
  opacity: .5; 
  cursor: not-allowed; 
  background-color: #a7aaad; /* Default disabled gray */
}

/* ── Spinner ───────────────────────────────────────────────── */
.tmg-spinner        { display: none; text-align: center; padding: 28px; opacity: .7; }
.tmg-spinner.active { display: block; }

.tmg-dots span {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  margin: 0 3px;
  animation: tmgPulse 1.2s infinite ease-in-out;
}
.tmg-dots span:nth-child(2) { animation-delay: .2s; }
.tmg-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes tmgPulse {
  0%,80%,100% { transform: scale(.6); opacity: .4; }
  40%          { transform: scale(1);  opacity: 1;  }
}

/* ── Results ───────────────────────────────────────────────── */
.tmg-results        { display: none; }
.tmg-results.active { display: block; }

.tmg-results-title { font-size: 1.2em; font-weight: 700; margin-bottom: 4px; }
.tmg-results-sub   { font-size: .875em; opacity: .6; margin-bottom: 20px; }

/* ── Idea cards ────────────────────────────────────────────── */
.tmg-idea-card {
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.tmg-idea-num {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .5;
  margin-bottom: 6px;
}

.tmg-idea-title {
  font-size: 1.1em;
  font-weight: 700;
  margin-bottom: 10px;
}

.tmg-subs { list-style: none; margin: 0; padding: 0; }

.tmg-sub-item {
  font-size: .9em;
  padding: 6px 0;
  border-top: 1px solid rgba(0,0,0,.07);
  opacity: .8;
}

.tmg-sub-item::before {
  content: "— ";
  opacity: .5;
}

/* ── Locked section ────────────────────────────────────────── */
/* FOMO blur — functional only, no colors */
.tmg-locked-section {
  position: relative;
  margin-top: 8px;
}

.tmg-cards-blurred {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.tmg-locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  text-align: center;
  /* Semi-transparent overlay using currentColor */
  background: rgba(255,255,255,.85);
  border-radius: 6px;
  z-index: 2;
}

.tmg-locked-icon  { font-size: 28px; margin-bottom: 10px; }
.tmg-locked-title { font-weight: 700; font-size: 1.1em; margin-bottom: 6px; }
.tmg-locked-text  { opacity: .75; margin-bottom: 16px; font-size: .9em; }

.tmg-locked-action { margin-bottom: 16px; }

/* ── Unlock form ───────────────────────────────────────────── */
.tmg-unlock-form { width: 100%; max-width: 360px; margin-bottom: 16px; }

.tmg-unlock-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: .7;
  margin-bottom: 6px;
}

.tmg-unlock-row {
  display: flex;
  gap: 8px;
}

.tmg-unlock-row input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 4px;
  font-family: inherit;
  font-size: inherit;
}

.tmg-unlock-btn {
  padding: 9px 16px;
  font-family: inherit;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.tmg-unlock-error {
  font-size: 13px;
  color: #b91c1c;
  margin-top: 5px;
  min-height: 18px;
}

/* ── Pro upsell ────────────────────────────────────────────── */
.tmg-pro-upsell {
  font-size: .85em;
  opacity: .7;
  margin-top: 8px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 540px) {
  .tmg-row      { grid-template-columns: 1fr; }
  .tmg-form     { padding: 16px; }
  .tmg-idea-card { padding: 14px 16px; }
  .tmg-unlock-row { flex-direction: column; }
}

/* ── Social Locker ─────────────────────────────────────────── */

/* Wrapper: position:relative keeps overlay inside — fixes Opera/Safari bug */
.tmg-ideas-locked-wrapper {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
}

/* Fog effect — blurred ideas visible behind the locker (Curiosity Gap) */
.tmg-blurred-content-active {
  filter: blur(7px);
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  transition: filter 0.5s ease, opacity 0.5s ease;
}

/* Locker overlay — transparent so blurred ideas show through */
.tmg-social-locker-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 99;
}

/* Locker box — solid white card stays sharp above the fog */
.tmg-locker-box {
  text-align: center;
  padding: 30px 24px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0,0,0,.15);
  max-width: 450px;
  width: 90%;
  position: relative;
  z-index: 11;
}

.tmg-locker-box .tmg-locked-icon {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
}

.tmg-locker-box .tmg-locked-title {
  font-size: 1.15em;
  font-weight: 700;
  margin: 0 0 8px;
}

.tmg-locker-box .tmg-locked-text {
  font-size: .9em;
  opacity: .75;
  margin: 0 0 18px;
  line-height: 1.5;
}

/* Social share buttons */
.tmg-social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.tmg-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: .85em;
  font-weight: 700;
  transition: opacity .2s, transform .1s;
  white-space: nowrap;
}

.tmg-share-btn:hover  { opacity: .88; color: #fff; text-decoration: none; }
.tmg-share-btn:active { transform: scale(.97); }

.tmg-fb      { background: #1877f2; }
.tmg-twitter { background: #000000; }
.tmg-linkedin{ background: #0077b5; }
.tmg-reddit  { background: #ff4500; }

/* Pro upsell */
.tmg-pro-upsell {
  font-size: .82em;
  opacity: .65;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 420px) {
  .tmg-social-buttons { flex-direction: column; align-items: center; }
  .tmg-share-btn      { width: 180px; justify-content: center; }
  .tmg-locker-box     { padding: 20px 16px; }
}
