/* SERP Kontrol — MacBook + iPhone 17 Pro Max · Google TR */

#admin-view-serp .serp-toolbar {
  margin-bottom: 20px;
}

#admin-view-serp .serp-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

#admin-view-serp .serp-kw-input {
  flex: 1 1 220px;
  min-width: 0;
  height: 46px !important;
}

#admin-view-serp .serp-site-input {
  flex: 1 1 200px;
  min-width: 0;
  height: 46px !important;
}

#admin-view-serp #serp-status.is-err {
  color: #f87171;
}

#admin-view-serp .serp-rank-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

#admin-view-serp .serp-rank-card {
  flex: 1 1 200px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 106, 0.25);
  background: rgba(0, 0, 0, 0.4);
}

#admin-view-serp .serp-rank-card strong {
  display: block;
  font-size: 1.6rem;
  color: #f0cc84;
  line-height: 1.1;
}

#admin-view-serp .serp-rank-card span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(212, 175, 106, 0.8);
}

#admin-view-serp .serp-rank-card.is-miss strong {
  color: #94a3b8;
  font-size: 1rem;
}

#admin-view-serp .serp-device-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 22px;
  align-items: start;
  justify-items: center;
  width: 100%;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  #admin-view-serp .serp-device-grid {
    grid-template-columns: 1fr;
  }
}

#admin-view-serp .serp-device-panel {
  width: 100%;
  max-width: 100%;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(212, 175, 106, 0.07), transparent 60%),
    rgba(0, 0, 0, 0.35);
}

#admin-view-serp .serp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

#admin-view-serp .serp-panel-head h3 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d4af6a;
}

#admin-view-serp .serp-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(212, 175, 106, 0.12);
  border: 1px solid rgba(212, 175, 106, 0.25);
  color: #e8c882;
}

#admin-view-serp .serp-badge.is-rank {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

#admin-view-serp .serp-badge.is-miss {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

/* MacBook — büyük ekran */
#admin-view-serp .macbook-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 28px 44px rgba(0, 0, 0, 0.5));
  width: 100%;
}

#admin-view-serp .macbook-lid {
  width: 100%;
  max-width: 980px;
  padding: 16px 16px 12px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #3a3a3c 0%, #1d1d1f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#admin-view-serp .macbook-screen-bezel {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 2px solid #0a0a0a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

#admin-view-serp .macbook-camera {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1a1a1c;
  z-index: 4;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

#admin-view-serp .serp-device-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#admin-view-serp .macbook-screen {
  position: relative;
  width: 100%;
  height: 640px;
  background: #fff;
  overflow: hidden;
}

#admin-view-serp .macbook-shot-scroll {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

#admin-view-serp .macbook-shot-scroll[hidden] {
  display: none !important;
}

#admin-view-serp .serp-frame-host {
  width: 100%;
  min-height: 100%;
  display: flex;
  justify-content: center;
  background: #fff;
}

#admin-view-serp .serp-device-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 640px;
  height: 640px;
  max-height: 640px;
  border: 0;
  background: #fff;
  vertical-align: top;
}

#admin-view-serp .serp-mobile-frame {
  min-height: 720px;
  height: 720px;
}

#admin-view-serp .macbook-shot-img,
#admin-view-serp .iphone-shot-img {
  display: block;
  width: 100%;
  min-width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

#admin-view-serp .macbook-shot-img[hidden],
#admin-view-serp .iphone-shot-img[hidden] {
  display: none !important;
}

#admin-view-serp .macbook-base {
  width: 108%;
  max-width: 1060px;
  height: 16px;
  margin-top: -1px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, #2b2b2d, #1a1a1c);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

#admin-view-serp .macbook-notch-foot {
  width: 140px;
  height: 5px;
  margin: 0 auto 8px;
  border-radius: 0 0 8px 8px;
  background: #3a3a3c;
}

/* iPhone 17 Pro Max — büyük */
#admin-view-serp .iphone-17-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding: 8px 0 0;
  filter: drop-shadow(0 32px 48px rgba(0, 0, 0, 0.45));
}

#admin-view-serp .iphone-17-shell {
  position: relative;
  width: 100%;
  max-width: 390px;
  padding: 13px;
  border-radius: 56px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.22) 0%, transparent 28%),
    linear-gradient(145deg, #d1d1d6 0%, #6e6e73 22%, #2c2c2e 48%, #9a9aa0 72%, #48484a 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 24px 50px rgba(0, 0, 0, 0.5);
}

#admin-view-serp .iphone-17-side-left {
  position: absolute;
  left: -3px;
  top: 130px;
  width: 3px;
  height: 36px;
  border-radius: 3px;
  background: linear-gradient(180deg, #5c5c60, #2e2e32);
  box-shadow: 0 58px 0 0 #3a3a3e, 0 108px 0 0 #3a3a3e;
}

#admin-view-serp .iphone-17-side-right {
  position: absolute;
  right: -3px;
  top: 165px;
  width: 3px;
  height: 70px;
  border-radius: 3px;
  background: linear-gradient(180deg, #5c5c60, #2e2e32);
}

#admin-view-serp .iphone-17-screen-wrap {
  position: relative;
  border-radius: 48px;
  overflow: hidden;
  background: #000;
  border: 2px solid rgba(0, 0, 0, 0.85);
}

#admin-view-serp .iphone-dynamic-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 32px;
  border-radius: 22px;
  background: #000;
  z-index: 5;
}

#admin-view-serp .iphone-17-screen {
  position: relative;
  width: 100%;
  height: 720px;
  background: #000;
  overflow: hidden;
}

#admin-view-serp .iphone-shot-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

#admin-view-serp .iphone-shot-scroll[hidden] {
  display: none !important;
}

#admin-view-serp .serp-device-frame[hidden] {
  display: none !important;
}

#admin-view-serp .device-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.82rem;
  color: #64748b;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  z-index: 3;
}

#admin-view-serp .device-loading[hidden] {
  display: none !important;
}

#admin-view-serp .device-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: #5f6368;
  background: #f8f9fa;
  z-index: 1;
}

#admin-view-serp .device-empty[hidden] {
  display: none !important;
}

#admin-view-serp .device-loading-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 106, 0.25);
  border-top-color: #d4af6a;
  animation: serp-spin 0.9s linear infinite;
}

@keyframes serp-spin {
  to { transform: rotate(360deg); }
}

/* Sonuç listesi */
#admin-view-serp .serp-results-panel {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
}

#admin-view-serp .serp-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

#admin-view-serp .serp-result-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  color: #202124;
  border: 1px solid #dfe1e5;
}

#admin-view-serp .serp-result-row.is-hit {
  border-color: #34a853;
  box-shadow: 0 0 0 1px rgba(52, 168, 83, 0.35);
  background: #f6fff8;
}

#admin-view-serp .serp-result-row.is-social {
  background: #fafbff;
}

#admin-view-serp .serp-social-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 0.65rem;
  font-weight: 700;
  vertical-align: middle;
}

#admin-view-serp .serp-result-pos {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1a73e8;
  text-align: center;
  padding-top: 2px;
}

#admin-view-serp .serp-result-row.is-hit .serp-result-pos {
  color: #188038;
}

#admin-view-serp .serp-result-url {
  font-size: 0.72rem;
  color: #006621;
  margin-bottom: 3px;
  word-break: break-all;
}

#admin-view-serp .serp-result-title {
  margin: 0 0 4px;
  font-size: 0.92rem;
  font-weight: 500;
  color: #1a0dab;
  line-height: 1.3;
}

#admin-view-serp .serp-result-snippet {
  margin: 0;
  font-size: 0.76rem;
  color: #4d5156;
  line-height: 1.4;
}

#admin-view-serp .serp-results-empty {
  padding: 24px;
  text-align: center;
  color: #7a8ba8;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

#admin-view-serp .serp-ext-link {
  text-decoration: none;
  white-space: nowrap;
}

/* Serper API ayarı */
#admin-view-settings .setting-card-wide {
  grid-column: 1 / -1;
}

#admin-view-settings .setting-card-wide input {
  width: 100%;
  max-width: 520px;
}
