/* ================================================================
   Floating Reviews Widget v1.3
   Author: Idakwo Emmanuel | https://idakwoei.serv00.net/
   ================================================================ */

/* ── TAB BUTTON ──────────────────────────────────────────────── */
#frw-tab-wrap {
  position: fixed !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 2147483646 !important;
  margin: 0 !important;
  padding: 0 !important;
  --frw-accent: #4f46e5;
}
#frw-tab-wrap.frw-pos-right { right: 0 !important; left: auto !important; }
#frw-tab-wrap.frw-pos-left  { left:  0 !important; right: auto !important; }

#frw-toggle-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  width: 40px !important;
  padding: 22px 0 !important;
  background: var(--frw-accent) !important;
  color: #fff !important;
  border: none !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  letter-spacing: .15em !important;
  text-transform: uppercase !important;
  overflow: hidden !important;
  transition: width .25s ease, background .2s !important;
  outline: none;
}
.frw-pos-right #frw-toggle-btn {
  border-radius: 10px 0 0 10px !important;
  box-shadow: -3px 0 20px rgba(0,0,0,.25) !important;
}
.frw-pos-left #frw-toggle-btn {
  border-radius: 0 10px 10px 0 !important;
  box-shadow:  3px 0 20px rgba(0,0,0,.25) !important;
}
#frw-toggle-btn:hover { background: #3730a3 !important; width: 46px !important; }
#frw-toggle-btn:focus-visible { outline: 3px solid var(--frw-accent) !important; outline-offset: 2px !important; }

.frw-tab-text {
  writing-mode: vertical-rl !important;
  text-orientation: mixed !important;
  transform: rotate(180deg) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  display: block !important;
}
.frw-tab-star { flex-shrink: 0 !important; display: block !important; }

/* ── FULL-SCREEN PAGE ────────────────────────────────────────── */
#frw-page {
  /* Dimensions — truly full viewport */
  position: fixed !important;
  top:    0 !important;
  left:   0 !important;
  right:  0 !important;
  bottom: 0 !important;
  width:  100vw !important;
  height: 100vh !important;
  min-width:  100vw !important;
  min-height: 100vh !important;
  max-width:  none !important;
  max-height: none !important;
  margin:  0 !important;

  /* Stacking — absolute maximum z-index */
  z-index: 2147483647 !important;

  /* Appearance */
  background: #f4f5ff !important;
  overflow-x: hidden !important;
  overflow-y: auto   !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;

  /* Kill any inherited weirdness */
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  clip: auto !important;
  clip-path: none !important;
  float: none !important;
  transform: translateX(105vw) !important; /* start off-screen RIGHT */
  transition: transform .42s cubic-bezier(.4,0,.2,1) !important;

  /* NOT visibility:hidden — that hides it permanently in some themes */
  /* Instead we use pointer-events + opacity trick */
  pointer-events: none !important;

  /* CSS custom properties for children */
  --frw-accent:      #4f46e5;
  --frw-accent-dark: #3730a3;
  --frw-accent-rgb:  79,70,229;
  --frw-gold:        #f59e0b;
}

/* Left-side variant starts off-screen LEFT */
#frw-page.frw-pos-left {
  transform: translateX(-105vw) !important;
}

/* OPEN — slides to x=0, fills screen */
#frw-page.frw-page-open {
  transform: translateX(0) !important;
  pointer-events: all !important;
}

/* ── Top Bar (sticky inside the page) ───────────────────────── */
.frw-topbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  height: 66px;
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  background: linear-gradient(135deg, var(--frw-accent) 0%, var(--frw-accent-dark) 100%);
  box-shadow: 0 3px 20px rgba(79,70,229,.35);
  box-sizing: border-box;
  flex-shrink: 0;
  width: 100%;
}

.frw-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.frw-topbar-left > svg { color: rgba(255,255,255,.9); flex-shrink: 0; }

.frw-topbar-title {
  font-size: 21px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.02em;
  white-space: nowrap;
  margin: 0;
}

.frw-topbar-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  padding: 4px 13px;
}
.frw-tb-avg   { font-size: 14px; font-weight: 800; color: #fff; }
.frw-tb-count { font-size: 12px; color: rgba(255,255,255,.75); }
.frw-tb-stars .frw-s-full  { color: #f59e0b; }
.frw-tb-stars .frw-s-half  { color: #f59e0b; opacity: .6; }
.frw-tb-stars .frw-s-empty { color: rgba(255,255,255,.3); }

/* Close button */
#frw-close-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.2);
  border: 1.5px solid rgba(255,255,255,.35);
  color: #fff;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: .03em;
  transition: background .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
#frw-close-btn:hover { background: rgba(255,255,255,.32); }
#frw-close-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ── Page content wrapper ────────────────────────────────────── */
.frw-page-content {
  min-height: calc(100vh - 66px);
  display: flex;
  flex-direction: column;
}

/* ── Two-column grid ─────────────────────────────────────────── */
.frw-page-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 40px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 44px 40px 60px;
  box-sizing: border-box;
  align-items: start;
}

/* ── Column headings ─────────────────────────────────────────── */
.frw-col-title {
  font-size: 23px;
  font-weight: 900;
  color: #1a1a2e;
  margin: 0 0 5px;
  letter-spacing: -.02em;
}
.frw-col-sub {
  font-size: 14px;
  color: #999;
  margin: 0 0 24px;
}

/* ── Form card ───────────────────────────────────────────────── */
.frw-form-col {
  background: #fff;
  border-radius: 20px;
  padding: 34px 30px;
  box-shadow: 0 6px 32px rgba(79,70,229,.08);
  position: sticky;
  top: 88px;
}

/* ── Fields ──────────────────────────────────────────────────── */
.frw-field { margin-bottom: 20px; }

.frw-field > label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #555;
  margin-bottom: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.frw-req { color: #4f46e5; margin-left: 2px; }

.frw-field input[type="text"],
.frw-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #e4e6f2;
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 15px;
  font-family: inherit;
  color: #1a1a2e;
  background: #f9faff;
  transition: border-color .2s, box-shadow .2s, background .2s;
  resize: vertical;
  display: block;
}
.frw-field input[type="text"]:focus,
.frw-field textarea:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79,70,229,.1);
  outline: none;
  background: #fff;
}

.frw-char-count {
  display: block;
  text-align: right;
  font-size: 11px;
  color: #bbb;
  margin-top: 5px;
}

/* ── Stars ───────────────────────────────────────────────────── */
.frw-stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 3px;
  margin-bottom: 6px;
}
.frw-stars input[type="radio"] { display: none; }
.frw-stars label {
  font-size: 38px;
  color: #d1d5db;
  cursor: pointer;
  transition: color .15s, transform .15s;
  margin: 0;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}
.frw-stars label:hover,
.frw-stars label:hover ~ label,
.frw-stars input:checked ~ label {
  color: #f59e0b;
  transform: scale(1.2);
}

.frw-rating-hint {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #4f46e5;
  min-height: 20px;
}

/* ── Messages ────────────────────────────────────────────────── */
#frw-msg {
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 14px;
  min-height: 0;
}
#frw-msg.frw-success {
  background: #ecfdf5; color: #065f46;
  border: 1.5px solid #6ee7b7; padding: 12px 16px;
}
#frw-msg.frw-error {
  background: #fef2f2; color: #991b1b;
  border: 1.5px solid #fca5a5; padding: 12px 16px;
}

/* ── Submit ──────────────────────────────────────────────────── */
#frw-submit {
  width: 100%;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px 22px;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 5px 22px rgba(79,70,229,.3);
  transition: background .2s, transform .15s, box-shadow .2s;
  letter-spacing: .02em;
}
#frw-submit:hover {
  background: #3730a3;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(79,70,229,.4);
}
#frw-submit:active  { transform: translateY(0); }
#frw-submit:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }
#frw-submit:focus-visible { outline: 3px solid #4f46e5; outline-offset: 3px; }

@keyframes frw-spin { to { transform: rotate(360deg); } }
.frw-spin { animation: frw-spin .8s linear infinite; display: inline-block; }

/* ── Summary box ─────────────────────────────────────────────── */
.frw-summary-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 28px;
  box-shadow: 0 4px 24px rgba(79,70,229,.07);
  border: 1px solid #e8eaf6;
}
.frw-avg-num {
  font-size: 56px;
  font-weight: 900;
  color: #1a1a2e;
  line-height: 1;
}
.frw-avg-right { display: flex; flex-direction: column; gap: 5px; }
.frw-avg-stars { font-size: 24px; }
.frw-avg-stars .frw-s-full  { color: #f59e0b; }
.frw-avg-stars .frw-s-half  { color: #f59e0b; opacity: .6; }
.frw-avg-stars .frw-s-empty { color: #e0e0e0; }
.frw-avg-label { font-size: 13px; color: #aaa; font-weight: 500; }

/* ── Review cards ────────────────────────────────────────────── */
#frw-reviews-list { display: flex; flex-direction: column; gap: 18px; }

.frw-review-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 2px 16px rgba(79,70,229,.05);
  border: 1px solid #eef0f8;
  transition: box-shadow .2s, transform .2s;
  animation: frwFadeUp .4s ease both;
}
.frw-review-card:hover {
  box-shadow: 0 8px 32px rgba(79,70,229,.12);
  transform: translateY(-2px);
}
@keyframes frwFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.frw-rc-header {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 12px;
}
.frw-rc-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #3730a3);
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(79,70,229,.28);
}
.frw-rc-meta { flex: 1; min-width: 0; }
.frw-rc-name { display: block; font-size: 15px; font-weight: 800; color: #1a1a2e; }
.frw-rc-date { display: block; font-size: 12px; color: #bbb; margin-top: 2px; }
.frw-rc-stars { color: #f59e0b; font-size: 17px; letter-spacing: 2px; flex-shrink: 0; }
.frw-rc-text  { font-size: 15px; color: #3d3d55; line-height: 1.65; margin: 0; }

/* ── Empty state ─────────────────────────────────────────────── */
.frw-empty { text-align: center; padding: 60px 20px; }
.frw-empty svg { display: block; margin: 0 auto 14px; opacity: .35; }
.frw-empty p   { font-size: 15px; color: #bbb; margin: 0; }

/* ── Page footer ─────────────────────────────────────────────── */
.frw-page-footer {
  text-align: center;
  padding: 20px 20px 30px;
  font-size: 12.5px;
  color: #c0c0d0;
  border-top: 1px solid #e8eaf6;
  margin-top: auto;
}
.frw-page-footer a { color: #4f46e5; text-decoration: none; font-weight: 700; }
.frw-page-footer a:hover { text-decoration: underline; }

/* ── Scrollbar ───────────────────────────────────────────────── */
#frw-page::-webkit-scrollbar       { width: 6px; }
#frw-page::-webkit-scrollbar-track { background: #f0f1f8; }
#frw-page::-webkit-scrollbar-thumb { background: #c5c7e8; border-radius: 999px; }

/* ── Tablet ──────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .frw-page-grid {
    grid-template-columns: 1fr;
    padding: 28px 22px 60px;
    gap: 26px;
  }
  .frw-form-col { position: static; }
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .frw-topbar { padding: 0 14px; height: 56px; }
  .frw-topbar-title { font-size: 17px; }
  .frw-topbar-badge { display: none; }
  #frw-close-btn span { display: none; }
  #frw-close-btn { padding: 8px 10px; }

  .frw-page-grid { padding: 16px 12px 50px; gap: 20px; }
  .frw-form-col  { padding: 22px 16px; border-radius: 14px; }
  .frw-col-title { font-size: 18px; }

  .frw-stars label { font-size: 42px; }
  .frw-avg-num     { font-size: 42px; }

  .frw-review-card { padding: 16px 14px; border-radius: 12px; }
  .frw-rc-avatar   { width: 38px; height: 38px; font-size: 16px; }
  .frw-rc-text     { font-size: 14px; }

  #frw-toggle-btn { width: 34px !important; padding: 18px 0 !important; }
}
