/* ReplicaChina Shared Inline AI Photo & Keyword Search Widget CSS (Wave 12 - 2026-12-01) */
.rc-is {
  margin: 0 0 22px;
  padding: 20px 24px;
  border: 2px solid #f0b899;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8f4 0%, #ffffff 100%);
  box-shadow: 0 12px 32px rgba(232, 85, 16, 0.07);
  box-sizing: border-box;
  max-width: 100%;
}
.rc-is * { box-sizing: border-box; }
.rc-is [hidden] { display: none !important; }

.rc-is__eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffece1;
  color: #b83d08;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rc-is__title {
  margin: 0 0 6px !important;
  font-size: clamp(1.18rem, 2vw, 1.42rem) !important;
  line-height: 1.24 !important;
  color: #18181b !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}

.rc-is__sub {
  margin: 0 0 14px !important;
  font-size: 0.94rem !important;
  line-height: 1.52 !important;
  color: #52525b !important;
}

.rc-is__drop {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 16px 18px;
  border: 2px dashed #e85510;
  border-radius: 12px;
  background: #ffffff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.rc-is__drop.is-drag {
  background: #fff3eb;
  border-color: #c94408;
}

.rc-is__drop-copy {
  flex: 1 1 240px;
  min-width: 0;
}

.rc-is__drop-copy strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #18181b;
  margin-bottom: 2px;
}

.rc-is__drop-copy span {
  display: block;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #52525b;
}

.rc-is__upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 10px;
  background: #e85510;
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  text-decoration: none !important;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(232, 85, 16, 0.24);
  transition: background 0.15s ease, transform 0.15s ease;
}

.rc-is__upload-label:hover {
  background: #c94408;
  color: #ffffff !important;
}

.rc-is__file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.rc-is__kw-form {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 12px 0 0;
  max-width: 100%;
}

.rc-is__kw-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d4d4d8;
  border-radius: 10px;
  background: #ffffff;
  color: #18181b;
  font-size: 15px;
}

.rc-is__kw-input:focus {
  outline: none;
  border-color: #e85510;
  box-shadow: 0 0 0 2px rgba(232, 85, 16, 0.2);
}

.rc-is__kw-btn {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #1e1d1b;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.rc-is__kw-btn:hover {
  background: #36332f;
}

.rc-is__status {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fafaf9;
  border: 1px solid #e7e5e4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rc-is__thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #d4d4d8;
  flex-shrink: 0;
}

.rc-is__status-body { flex: 1; min-width: 0; }
.rc-is__status-text { font-size: 0.9rem; font-weight: 700; color: #18181b; margin: 0 0 7px !important; }
.rc-is__bar { width: 100%; height: 8px; border-radius: 999px; background: #e7e5e4; overflow: hidden; }
.rc-is__bar-fill { height: 100%; width: 12%; background: #e85510; transition: width 0.25s ease; }

.rc-is__error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 9px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.9rem;
  font-weight: 600;
}

.rc-is__results-wrap {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid #eceae7;
}

.rc-is__results-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}

.rc-is__results-head {
  margin: 0 !important;
  font-size: 0.94rem !important;
  font-weight: 800 !important;
  color: #18181b !important;
}

.rc-is__reset {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #d4d4d8;
  background: #ffffff;
  color: #18181b;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.rc-is__reset:hover {
  border-color: #e85510;
  color: #c94408;
}

.rc-is__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 12px;
}

.rc-is__card {
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.rc-is__card-img {
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: #f7f7f5;
  cursor: zoom-in;
  display: block;
}

.rc-is__card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.rc-is__card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.rc-is__card-title {
  margin: 0 !important;
  font-size: 0.85rem !important;
  line-height: 1.35 !important;
  color: #18181b !important;
  font-weight: 700 !important;
  overflow-wrap: anywhere;
}

.rc-is__card-price {
  margin: 0 !important;
  font-size: 0.96rem !important;
  font-weight: 800 !important;
  color: #c94408 !important;
}

.rc-is__card-ref {
  margin: 0 !important;
  font-size: 0.75rem !important;
  color: #71717a !important;
  overflow-wrap: anywhere;
}

.rc-is__card-wa {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #15803d;
  color: #ffffff !important;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none !important;
  text-align: center;
}

.rc-is__card-wa:hover {
  background: #166534;
  color: #ffffff !important;
}

.rc-is__meta {
  margin: 12px 0 0 !important;
  font-size: 0.8rem !important;
  line-height: 1.45 !important;
  color: #71717a !important;
}

.rc-is__dialog {
  width: min(92vw, 720px);
  max-height: 90vh;
  border: 0;
  border-radius: 14px;
  padding: 16px;
}

.rc-is__dialog::backdrop { background: rgba(15, 23, 42, 0.75); }
.rc-is__dialog img { width: 100%; max-height: 72vh; object-fit: contain; display: block; margin: 8px auto 0; }
.rc-is__dialog-close {
  display: block;
  margin-left: auto;
  min-width: 40px;
  min-height: 40px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: #ffffff;
  font-size: 22px;
  cursor: pointer;
}

.rc-is__faq {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e7e5e4;
}
.rc-is__faq h3 { margin: 0 0 10px !important; font-size: 1.05rem !important; color: #18181b !important; }
.rc-is__faq h4 { margin: 14px 0 4px !important; font-size: 0.96rem !important; font-weight: 700 !important; color: #18181b !important; }
.rc-is__faq p { margin: 0 0 8px !important; font-size: 0.92rem !important; line-height: 1.55 !important; color: #52525b !important; }

/* Quick-browse chips inside widget */
.rc-is .rc-yupoo-ai__chips,
.rc-is .rc-photo-seo__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed #eed6c7;
}

.rc-is .rc-yupoo-ai__chips-label,
.rc-is .rc-photo-seo__chips-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #52525b;
  margin-right: 2px;
  flex-shrink: 0;
}

.rc-is .rc-yupoo-ai__chip,
.rc-is .rc-photo-seo__chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #f2cab3;
  background: #fff6f1;
  color: #b83d08 !important;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.rc-is .rc-yupoo-ai__chip:hover,
.rc-is .rc-photo-seo__chip:hover {
  background: #e85510;
  border-color: #e85510;
  color: #ffffff !important;
}

@media (max-width: 600px) {
  .rc-is {
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 16px;
  }
  .rc-is__eyebrow {
    font-size: 0.7rem;
    margin-bottom: 6px;
  }
  .rc-is__title {
    font-size: 1.12rem !important;
  }
  .rc-is__sub {
    font-size: 0.86rem !important;
    margin-bottom: 10px !important;
  }
  .rc-is__drop {
    padding: 12px;
    gap: 10px;
  }
  .rc-is__drop-copy strong {
    font-size: 0.94rem;
  }
  .rc-is__drop-copy span {
    font-size: 0.8rem;
  }
  .rc-is__upload-label {
    width: 100%;
    min-height: 44px;
    padding: 9px 14px;
    font-size: 0.92rem;
  }
  .rc-is__kw-form {
    flex-direction: row;
    gap: 6px;
    margin-top: 10px;
  }
  .rc-is__kw-input {
    height: 42px;
    padding: 0 10px;
    font-size: 14.5px;
  }
  .rc-is__kw-btn {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.86rem;
  }
  .rc-is .rc-yupoo-ai__chips,
  .rc-is .rc-photo-seo__chips {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 6px;
    padding-top: 10px;
    margin-top: 10px;
  }
  .rc-is .rc-yupoo-ai__chips-label,
  .rc-is .rc-photo-seo__chips-label {
    flex: 1 0 100%;
    font-size: 0.8rem;
    margin: 0 0 2px;
  }
  .rc-is .rc-yupoo-ai__chip,
  .rc-is .rc-photo-seo__chip {
    min-height: 32px;
    padding: 4px 11px;
    font-size: 0.8rem;
  }
  .rc-is__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
}
