/* Sitene Ekle — embed widget + builder (gulp dışı, dist/embed/) */

/* --- Widget (iframe) --- */
html.kan-embed-root,
.kan-embed-body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  background: var(--kan-embed-bg, #fff);
  color: var(--kan-embed-text, #161616);
  overflow: hidden;
}

.kan-embed {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

.kan-embed__main {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.kan-embed__main > .kan-embed__header,
.kan-embed__main > .kan-embed__list,
.kan-embed__main > .kan-embed__empty,
.kan-embed__main > .kan-embed__ticker,
.kan-embed__main > .kan-embed__manset {
  flex: 1;
  min-height: 0;
}

.kan-embed__main > .kan-embed__header {
  flex: 0 0 auto;
}

.kan-embed__header {
  flex-shrink: 0;
  padding: 10px 12px;
  border-bottom: 2px solid var(--kan-embed-accent, #cf061c);
  background: var(--kan-embed-bg, #fff);
}

.kan-embed__title {
  font-weight: 700;
  font-size: 15px;
  color: var(--kan-embed-accent, #cf061c);
}

.kan-embed__list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

.kan-embed__item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.kan-embed__item:last-child {
  border-bottom: 0;
}

.kan-embed__thumb {
  flex-shrink: 0;
  display: block;
  width: 80px;
  height: 53px;
  overflow: hidden;
  border-radius: 4px;
}

.kan-embed__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kan-embed__content {
  flex: 1;
  min-width: 0;
}

.kan-embed__link {
  display: block;
  color: var(--kan-embed-text, #161616);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
}

.kan-embed__link:hover {
  color: var(--kan-embed-accent, #cf061c);
}

.kan-embed__date {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
}

.kan-embed__list--compact .kan-embed__item {
  padding: 8px 12px;
}

.kan-embed__list--compact .kan-embed__link {
  font-size: 12px;
  font-weight: 500;
}

.kan-embed__list--grid {
  display: grid;
  grid-template-columns: repeat(var(--kan-embed-cols, 2), minmax(0, 1fr));
  gap: 0;
}

.kan-embed__list--grid .kan-embed__item {
  flex-direction: column;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.kan-embed__list--grid .kan-embed__thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
}

.kan-embed__empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: rgba(0, 0, 0, 0.5);
}

.kan-embed__brand {
  flex: 0 0 auto;
  flex-shrink: 0;
  padding: 8px 12px;
  min-height: var(--kan-embed-footer-h, 30px);
  box-sizing: border-box;
  text-align: center;
  font-size: 11px;
  line-height: 1.3;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
}

.kan-embed__brand a {
  color: var(--kan-embed-accent, #cf061c);
  text-decoration: none;
  font-weight: 600;
}

.kan-embed__brand-sep {
  margin: 0 6px;
  color: rgba(0, 0, 0, 0.35);
  font-weight: 400;
}

.kan-embed-body.kan-embed-type-ticker {
  background: var(--kan-embed-bg, #fff);
}

.kan-embed-type-ticker .kan-embed {
  min-height: 48px;
}

.kan-embed__ticker {
  flex: 1;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  min-height: 48px;
  width: 100%;
  background: var(--kan-embed-bg, #fff);
}

.kan-embed__ticker-label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  min-height: 48px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--kan-embed-accent, #cf061c);
  white-space: nowrap;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.15);
}

.kan-embed__ticker-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: kan-embed-ticker-pulse 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes kan-embed-ticker-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65); }
  75% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.kan-embed__ticker-label-text {
  line-height: 1;
}

.kan-embed__ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: linear-gradient(90deg, var(--kan-embed-bg, #fff) 0%, transparent 3%, transparent 97%, var(--kan-embed-bg, #fff) 100%);
}

.kan-embed__ticker-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kan-embed__ticker--horizontal .kan-embed__ticker-track {
  display: flex;
  align-items: center;
}

.kan-embed__ticker--horizontal .kan-embed__ticker-inner {
  display: flex;
  width: max-content;
  animation: kan-embed-marquee var(--kan-ticker-speed, 30s) linear infinite;
}

.kan-embed__ticker--horizontal .kan-embed__ticker-track:hover .kan-embed__ticker-inner {
  animation-play-state: paused;
}

@keyframes kan-embed-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.kan-embed__ticker--horizontal .kan-embed__ticker-list {
  display: flex;
  white-space: nowrap;
  flex-shrink: 0;
}

.kan-embed__ticker--horizontal .kan-embed__ticker-item {
  display: inline-flex;
  flex-shrink: 0;
  position: relative;
}

.kan-embed__ticker--horizontal .kan-embed__ticker-item + .kan-embed__ticker-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 16px;
  background: rgba(0, 0, 0, 0.12);
}

.kan-embed__ticker--horizontal .kan-embed__ticker-item a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  height: 48px;
  color: var(--kan-embed-text, #161616);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.kan-embed__ticker--horizontal .kan-embed__ticker-item a:hover {
  color: var(--kan-embed-accent, #cf061c);
}

.kan-embed__ticker--horizontal .kan-embed__ticker-item a:hover .kan-embed__ticker-title {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kan-embed__ticker-date {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--kan-embed-accent, #cf061c);
  background: color-mix(in srgb, var(--kan-embed-accent, #cf061c) 12%, transparent);
}

.kan-embed__ticker-title {
  line-height: 1.35;
}

.kan-embed__ticker--vertical {
  flex-direction: column;
}

.kan-embed__ticker--vertical .kan-embed__ticker-label {
  justify-content: center;
  padding: 10px 14px;
}

.kan-embed__ticker--vertical .kan-embed__ticker-label::after {
  display: none;
}

.kan-embed__ticker--vertical .kan-embed__ticker-track {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--kan-embed-bg, #fff);
}

.kan-embed__ticker--vertical .kan-embed__ticker-list {
  will-change: transform;
}

.kan-embed__ticker--vertical .kan-embed__ticker-item {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  box-sizing: border-box;
  border-bottom: 0;
  transition: background 0.2s ease;
}

.kan-embed__ticker--vertical .kan-embed__ticker-item:nth-child(even) {
  background: transparent;
}

.kan-embed__ticker--vertical .kan-embed__ticker-item:hover {
  background: color-mix(in srgb, var(--kan-embed-accent, #cf061c) 6%, var(--kan-embed-bg, #fff));
}

.kan-embed__ticker-index {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--kan-embed-accent, #cf061c);
  background: color-mix(in srgb, var(--kan-embed-accent, #cf061c) 10%, transparent);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.kan-embed__ticker--vertical .kan-embed__ticker-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  color: var(--kan-embed-text, #161616);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease;
}

.kan-embed__ticker--vertical .kan-embed__ticker-item a:hover {
  color: var(--kan-embed-accent, #cf061c);
}

.kan-embed__ticker--vertical .kan-embed__ticker-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Builder sayfası --- */
.kanews-embed-builder {
  padding: 20px 15px 30px;
}

.kanews-embed-builder__intro h1 {
  margin: 0 0 10px;
  font-size: 24px;
}

.kanews-embed-builder__intro-content {
  margin: 0 0 20px;
  color: var(--kan-text-color-muted, #525659);
}

.kanews-embed-builder__intro-content p:last-child {
  margin-bottom: 0;
}

.kanews-embed-builder__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 991px) {
  .kanews-embed-builder__grid {
    grid-template-columns: 1fr;
  }
}

.kanews-embed-builder__panel,
.kanews-embed-builder__preview-wrap {
  background: var(--kan-bg-white-color, #fff);
  border: 1px solid var(--kan-border-color, #e5e5e5);
  border-radius: var(--kan-block-radius, 8px);
  padding: 16px;
}

.kanews-embed-builder__preview-wrap h3,
.kanews-embed-builder__code h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.kanews-embed-builder__field {
  margin-bottom: 14px;
}

.kanews-embed-builder__field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.kanews-embed-builder__field-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--kan-text-color-muted, #525659);
}

.kanews-embed-builder__field input[type="text"],
.kanews-embed-builder__field input[type="number"],
.kanews-embed-builder__field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--kan-border-color, #ddd);
  border-radius: 6px;
  font-size: 14px;
  background: var(--kan-bg-white-color, #fff);
  color: var(--kan-text-color, #161616);
}

.kanews-embed-builder__field input[type="color"] {
  width: 100%;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--kan-border-color, #ddd);
  border-radius: 6px;
  cursor: pointer;
}

.kanews-embed-builder__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.kanews-embed-builder__row--colors {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 575px) {
  .kanews-embed-builder__row--colors {
    grid-template-columns: 1fr;
  }
}

.kanews-embed-builder__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 8px;
}

.kanews-embed-builder__checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.kanews-embed-builder__preview {
  display: flex;
  justify-content: stretch;
  align-items: flex-start;
  min-height: 200px;
  background: #f5f5f5;
  border-radius: 6px;
  padding: 12px;
  overflow: auto;
}

.kanews-embed-builder__preview iframe {
  width: 100%;
  border: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kanews-embed-builder__code-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--kan-text-color-muted, #525659);
}

.kanews-embed-builder__code-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanews-embed-builder__code-box textarea {
  width: 100%;
  padding: 12px;
  font-family: monospace;
  font-size: 12px;
  border: 1px solid var(--kan-border-color, #ddd);
  border-radius: 6px;
  resize: vertical;
  background: var(--kan-bg-white-color, #fff);
  color: var(--kan-text-color, #161616);
}

.kanews-embed-builder__code-box .kanews-btn {
  align-self: flex-start;
}

/* Manşet slider — numaralı (Manşet #2 benzeri) */
.kan-embed__manset {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: var(--kan-embed-bg, #fff);
  box-sizing: border-box;
}

.kan-embed__manset-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.kan-embed__manset-counter-sep {
  opacity: 0.65;
}

.kan-embed__manset-viewport {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #000;
}

.kan-embed__manset-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
  will-change: transform;
}

.kan-embed__manset-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.kan-embed__manset-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
}

.kan-embed__manset-image {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.kan-embed__manset-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.05) 100%);
  pointer-events: none;
}

.kan-embed__manset-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 16px 16px;
  z-index: 2;
}

.kan-embed__manset-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.kan-embed__manset-excerpt {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kan-embed__manset-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.92);
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.kan-embed__manset-arrow--prev {
  left: 0;
}

.kan-embed__manset-arrow--next {
  right: 0;
  border-radius: 8px 0 0 8px;
}

.kan-embed__manset-arrow:hover {
  background: var(--kan-embed-accent, #cf061c);
  color: #fff;
}

.kan-embed__manset--numbered .kan-embed__manset-content {
  padding-bottom: 14px;
}

.kan-embed__manset-dots {
  position: relative;
  z-index: 5;
  flex: 0 0 36px;
  display: flex;
  align-items: stretch;
  height: 36px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--kan-embed-bg, #fff);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-top: 0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
  scrollbar-width: thin;
}

.kan-embed__manset-dot {
  flex: 1 1 0;
  min-width: 34px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.kan-embed__manset-dot:last-child {
  border-right: 0;
}

.kan-embed__manset-dot span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--kan-embed-text, #161616);
}

.kan-embed__manset-dot.is-active,
.kan-embed__manset-dot:hover {
  background: var(--kan-embed-accent, #cf061c);
}

.kan-embed__manset-dot.is-active span,
.kan-embed__manset-dot:hover span {
  color: #fff;
}

@media (max-width: 480px) {
  .kan-embed__manset-dot {
    min-width: 30px;
    font-size: 13px;
  }

  .kan-embed__manset-counter {
    top: 8px;
    right: 8px;
    font-size: 11px;
  }
}

/* Servis widget'ları */
.kan-embed__service {
  padding: 10px 12px;
  overflow: auto;
}

.kan-embed__service-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--kan-embed-accent, #cf061c);
  margin-bottom: 10px;
}

.kan-embed__service-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kan-embed__service-item {
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--kan-embed-text, #161616) 12%, transparent);
}

.kan-embed__service-item:last-child {
  border-bottom: 0;
}

.kan-embed__service-title {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.kan-embed__service-sub {
  display: block;
  font-size: 12px;
  opacity: 0.75;
  line-height: 1.4;
}

.kan-embed__service-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--kan-embed-accent, #cf061c);
  text-decoration: none;
}

.kan-embed__service-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--kan-embed-accent, #cf061c);
  text-decoration: none;
}

.kan-embed__prayer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.kan-embed__prayer-item {
  text-align: center;
  padding: 8px 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--kan-embed-accent, #cf061c) 8%, var(--kan-embed-bg, #fff));
}

.kan-embed__prayer-name {
  display: block;
  font-size: 11px;
  opacity: 0.75;
}

.kan-embed__prayer-time {
  display: block;
  font-size: 15px;
  font-weight: 800;
  margin-top: 4px;
}

.kan-embed__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.kan-embed__table th,
.kan-embed__table td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid color-mix(in srgb, var(--kan-embed-text, #161616) 10%, transparent);
}

.kan-embed__table th {
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.7;
}

.kan-embed__match-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kan-embed__match-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--kan-embed-text, #161616) 10%, transparent);
  font-size: 13px;
}

.kan-embed__match-item:last-child {
  border-bottom: 0;
}

.kan-embed__match-time {
  font-size: 12px;
  opacity: 0.7;
}

.kan-embed__match-teams {
  font-weight: 600;
  line-height: 1.3;
}

.kan-embed__match-score,
.kan-embed__match-status {
  font-size: 12px;
  font-weight: 800;
  color: var(--kan-embed-accent, #cf061c);
  white-space: nowrap;
}

.kan-embed__markets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.kan-embed__market-item {
  padding: 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--kan-embed-text, #161616) 4%, var(--kan-embed-bg, #fff));
}

.kan-embed__market-name {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.75;
}

.kan-embed__market-value {
  display: block;
  font-size: 16px;
  font-weight: 800;
  margin-top: 4px;
}

.kan-embed__market-change {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.kan-embed__market-item.is-up .kan-embed__market-change {
  color: #16a34a;
}

.kan-embed__market-item.is-down .kan-embed__market-change {
  color: #dc2626;
}

@media (max-width: 480px) {
  .kan-embed__prayer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kan-embed__markets-grid {
    grid-template-columns: 1fr;
  }
}
