/* ============================================================
   Metafor Google Sıralama Bulucu — Style
   Renkler: #00C9A7 (turkuaz/yeşil ana), #0D2137 (lacivert koyu),
            #ffffff (beyaz), #F0FAFA (açık mint bg)
============================================================ */

:root {
  --mrc-primary:      #00C9A7;
  --mrc-primary-dark: #00a98c;
  --mrc-navy:         #0D2137;
  --mrc-navy-light:   #1a3a5c;
  --mrc-text:         #2d3748;
  --mrc-muted:        #718096;
  --mrc-border:       #e2e8f0;
  --mrc-bg-card:      #ffffff;
  --mrc-bg-page:      #f0fafa;
  --mrc-input-line:   #00C9A7;
  --mrc-radius:       16px;
  --mrc-shadow:       0 4px 32px rgba(0, 201, 167, 0.10), 0 1px 8px rgba(13,33,55,0.07);
}

/* ── Wrapper ── */
#mrc-wrapper {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 40px;
  box-sizing: border-box;
}

/* ── Kart ── */
.mrc-card {
  background: var(--mrc-bg-card);
  border-radius: var(--mrc-radius);
  box-shadow: var(--mrc-shadow);
  border: 1px solid rgba(0,201,167,0.12);
  overflow: hidden;
}

/* ── Satırlar ── */
.mrc-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.mrc-row--top {
  padding: 20px 28px 16px;
  gap: 0;
}

.mrc-row--bottom {
  padding: 16px 28px 22px;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Dikey Ayraç ── */
.mrc-divider-v {
  width: 1px;
  height: 52px;
  background: var(--mrc-border);
  flex-shrink: 0;
  margin: 0 16px;
}

/* ── Yatay Ayraç ── */
.mrc-divider-h {
  height: 1px;
  background: var(--mrc-border);
  margin: 0 28px;
}

/* ── Alan ── */
.mrc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
}

.mrc-field--select {
  min-width: 150px;
}

.mrc-field--captcha {
  min-width: 140px;
  flex: 1;
}

/* ── Etiket ── */
.mrc-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--mrc-primary);
  text-transform: uppercase;
  margin-bottom: 2px;
  cursor: default;
  line-height: 1;
}

.mrc-icon {
  display: flex;
  align-items: center;
  color: var(--mrc-primary);
}

.mrc-icon svg {
  width: 14px;
  height: 14px;
}

/* ── Metin Input ── */
.mrc-input {
  border: none;
  border-bottom: 1.5px solid var(--mrc-border);
  border-radius: 0;
  padding: 5px 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--mrc-text);
  background: transparent;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .2s ease;
  font-family: inherit;
}

.mrc-input::placeholder {
  color: #b0bec5;
  font-size: 12px;
  font-weight: 300;
}

.mrc-input:focus {
  border-bottom-color: var(--mrc-input-line);
}

/* ── Select ── */
.mrc-select {
  border: none;
  border-bottom: 1.5px solid var(--mrc-border);
  border-radius: 0;
  padding: 5px 20px 5px 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--mrc-text);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2300C9A7' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 2px center;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color .2s ease;
  font-family: inherit;
}

.mrc-select:focus {
  border-bottom-color: var(--mrc-input-line);
}

/* ── Captcha ── */
.mrc-captcha-img-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mrc-captcha-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--mrc-navy);
  user-select: none;
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,0.15);
  text-decoration-thickness: 2px;
  padding: 6px 10px;
  background: linear-gradient(135deg, #f0fafa 0%, #e8f5f3 100%);
  border-radius: 8px;
  border: 1px solid rgba(0,201,167,0.2);
  min-width: 110px;
  text-align: center;
}

.mrc-captcha-refresh {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--mrc-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color .2s, transform .3s;
  border-radius: 50%;
}

.mrc-captcha-refresh:hover {
  color: var(--mrc-primary);
  transform: rotate(180deg);
}

.mrc-captcha-refresh svg {
  width: 16px;
  height: 16px;
}

/* ── Buton ── */
.mrc-btn {
  background: var(--mrc-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .2s, transform .15s, box-shadow .2s;
  flex-shrink: 0;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(0,201,167,0.3);
  white-space: nowrap;
}

.mrc-btn:hover {
  background: var(--mrc-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,201,167,0.4);
}

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

.mrc-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ── Spinner ── */
.mrc-spin {
  width: 18px;
  height: 18px;
  animation: mrc-rotate 0.8s linear infinite;
}

@keyframes mrc-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Hata Mesajı ── */
.mrc-error {
  margin-top: 20px;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-left: 4px solid #fc8181;
  border-radius: 10px;
  padding: 14px 18px;
  color: #c53030;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.mrc-error svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #fc8181;
  margin-top: 1px;
}

/* ── Sonuç Kartı ── */
.mrc-result-card {
  margin-top: 24px;
  border-radius: var(--mrc-radius);
  overflow: hidden;
  box-shadow: var(--mrc-shadow);
  animation: mrc-fadein .4s ease;
}

@keyframes mrc-fadein {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Başarılı */
.mrc-result-card.mrc-found {
  border: 1px solid rgba(0,201,167,0.25);
}

/* Bulunamadı */
.mrc-result-card.mrc-not-found {
  border: 1px solid #fed7d7;
}

/* ── Sonuç Header ── */
.mrc-result-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 28px;
}

.mrc-found .mrc-result-header {
  background: linear-gradient(135deg, #00C9A7 0%, #00a98c 100%);
  color: #fff;
}

.mrc-not-found .mrc-result-header {
  background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
  color: #fff;
}

.mrc-result-header-icon svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

.mrc-result-header-text h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.mrc-result-header-text p {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

/* ── Sıralama Rozeti ── */
.mrc-rank-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 12px;
  padding: 8px 20px;
  text-align: center;
  flex-shrink: 0;
}

.mrc-rank-badge-num {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}

.mrc-rank-badge-label {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Sonuç Detayları ── */
.mrc-result-body {
  background: #fff;
  padding: 22px 28px;
}

.mrc-result-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.mrc-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mrc-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mrc-muted);
}

.mrc-meta-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--mrc-navy);
}

/* ── Google Önizlemesi ── */
.mrc-preview-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mrc-muted);
  margin-bottom: 10px;
}

.mrc-google-preview {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid var(--mrc-border);
}

.mrc-google-preview-url {
  font-size: 12px;
  color: #0a7e5e;
  margin-bottom: 4px;
  word-break: break-all;
}

.mrc-google-preview-title {
  font-size: 18px;
  font-weight: 500;
  color: #1a0dab;
  margin-bottom: 4px;
  line-height: 1.3;
  cursor: pointer;
}

.mrc-google-preview-title:hover {
  text-decoration: underline;
}

.mrc-google-preview-snippet {
  font-size: 13px;
  color: var(--mrc-text);
  line-height: 1.5;
}

/* ── Sayfa Bilgisi ── */
.mrc-page-info {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--mrc-border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--mrc-muted);
}

.mrc-page-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--mrc-primary);
  color: #fff;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}

/* ── Not Found Body ── */
.mrc-not-found-body {
  background: #fff;
  padding: 22px 28px;
  color: var(--mrc-text);
  font-size: 14px;
  line-height: 1.6;
}

.mrc-not-found-body p {
  margin: 0 0 10px;
}

.mrc-not-found-tips {
  margin: 0;
  padding-left: 18px;
  color: var(--mrc-muted);
}

.mrc-not-found-tips li {
  margin-bottom: 4px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .mrc-row--top {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px 18px 14px;
  }

  .mrc-divider-v {
    display: none;
  }

  .mrc-divider-h {
    margin: 0 18px;
  }

  .mrc-row--bottom {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 18px 18px;
  }

  .mrc-btn {
    width: 100%;
    justify-content: center;
  }

  .mrc-result-header {
    flex-wrap: wrap;
    padding: 18px;
  }

  .mrc-rank-badge {
    margin-left: 0;
    width: 100%;
  }

  .mrc-result-body,
  .mrc-not-found-body {
    padding: 16px 18px;
  }

  .mrc-result-meta {
    gap: 16px;
  }
}

/* ── API Uyarısı ── */
.mrc-api-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #92400e;
}
.mrc-api-warning svg { width:20px; height:20px; color:#f59e0b; flex-shrink:0; }
.mrc-api-warning a { color: #00C9A7; font-weight:600; }
