/* === RESET === */
.gctts-player button:not(.gctts-close),
.gctts-player .gctts-main-btn,
.gctts-player .gctts-secondary-btn {
  all: unset;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  user-select: none;
  border-radius: 50%;
}

/* === OBAL === */
.gctts-player {
  position: relative;
  display: inline-block;
  font-family: system-ui, sans-serif;
}

/* === BLOK "Přehrát článek" === */
.gctts-main {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f0f0;
  border-radius: 9999px;
  height: 36px;
  padding: 4px 10px 4px 4px;
 /* margin-left: 40px;*/
  user-select: none;
  transition: background 0.2s ease;
  cursor: pointer;
}
.gctts-main:hover {
  background: #e9e9e9;
}

/* === HLAVNÍ PLAY TLAČÍTKO === */
.gctts-main-btn {
  width: 28px !important;
  height: 28px !important;
  background: #14437c !important;
  color: #fff !important;
  flex-shrink: 0;
  cursor: default !important;
}
.gctts-main-btn .gctts-icon {
  width: 16px;
  height: 16px;
  fill: #fff;
}

/* === SVG IKONY === */
.gctts-icon {
  width: 22px !important;
  height: 22px !important;
  fill: #fff !important;
  stroke: none !important;
  flex-shrink: 0;
  display: inline-block !important;
}
.hidden {
  display: none !important;
}

.gctts-label {
  font-size: 15px;
  color: #333;
}

/* === POPUP === */
.gctts-popup {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  transform: translateY(10px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  width: 340px;
  padding: 16px 16px 18px 16px;
  transition: opacity 0.35s ease, transform 0.35s ease;
  animation: gcttsFadeOut 0.35s ease forwards;
}

/* === Stav otevřený === */
.gctts-popup.show {
  animation: gcttsFadeIn 0.4s ease forwards; /* ✅ plynulé otevření */
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* === Stav zavírání === */
.gctts-popup.hiding {
  animation: gcttsFadeOut 0.35s ease forwards;
}

/* === Skrytý === */
.gctts-popup.hidden {
  display: none !important;
}

/* === ANIMACE === */
@keyframes gcttsFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes gcttsFadeOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
}

/* === KŘÍŽEK === */
.gctts-close {
  position: absolute;
  top: -6px;
  right: 8px;
  width: 26px;
  height: 26px;
  background: none !important;
  border: none !important;
  font-size: 20px;
  line-height: 1;
  font-weight: normal;
  cursor: pointer;
  color: #666;
  text-decoration: none !important;
  transition: color 0.2s ease;
  z-index: 200;
}
.gctts-close:hover {
  color: #000;
  text-decoration: none !important;
  transform: none !important;
}

/* === HLAVIČKA === */
.gctts-popup-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-weight: 600;
  margin-bottom: 14px;
  margin-right: 30px; /* ✅ nový offset */
  position: relative;
  padding-top: 6px;
}
.gctts-title {
  flex: 1;
  margin-left: 10px;
  font-size: 15px;
  text-align: left;
  color: #222;
  line-height: 1.3;
}

/* === OBSAH === */
.gctts-popup-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* === SEKUNDÁRNÍ PLAY (kulatý) === */
.gctts-secondary-btn {
  width: 46px !important;
  height: 46px !important;
  background: #14437c !important;
  color: #fff !important;
  transition: background 0.25s ease, transform 0.2s ease;
}
.gctts-secondary-btn:hover {
  background: #10386a !important;
  transform: scale(1.05);
}

/* === PROGRESS BAR === */
.gctts-progress-wrap {
  width: 100%;
  margin-top: 4px;
}

.gctts-seek,
.gctts-volume-slider {
  -webkit-appearance: none;
  height: 6px;
  border-radius: 4px;
  background: #ddd;
  outline: none;
  cursor: pointer;
  overflow: hidden;
}

.gctts-seek {
  width: 100%;
}

/* === HLASITOST === */
.gctts-volume {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-top: -4px;
  margin-bottom: 2px;
}
.gctts-volume label {
  flex: 1;
  color: #333;
  font-weight: normal;
  text-align: left;
}
.gctts-volume-slider {
  width: 50%;
  align-self: center;
  justify-self: flex-end;
}

/* === RANGE THUMB === */
.gctts-seek::-webkit-slider-thumb,
.gctts-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e20804;
  box-shadow: -200px 0 0 200px #14437c;
}
.gctts-seek::-moz-range-thumb,
.gctts-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e20804;
  box-shadow: -200px 0 0 200px #14437c;
}

/* === ČAS === */
.gctts-time {
  font-size: 13px;
  color: #666;
  display: flex;
  justify-content: space-between;
  width: 100%;
}

/* === RYCHLOST PŘEHRÁVÁNÍ === */
.gctts-speed {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-top: 0;
}
.gctts-speed label {
  flex: 1;
  color: #333;
  font-weight: normal;
  text-align: left;
}

/* === DROPDOWN === */
.gctts-rate {
  border: 1px solid #ccc;
  border-radius: 0;
  padding: 4px 6px;
  cursor: pointer;
  color: #14437c;
  font-weight: 500;
  background: #fff;
  transition: border 0.2s ease, background 0.2s ease;
}
.gctts-rate:hover {
  border-color: #14437c;
  background: #f3f6fb;
}
/* === VIEWPORT FIX (mobile + flip) === */
.gctts-popup.gctts-flip{
  top: auto;
  bottom: calc(100% + 8px);
  transform: translateY(-10px) scale(0.96);
}
.gctts-popup.gctts-flip.show{
  animation: gcttsFadeInUp 0.4s ease forwards;
}
.gctts-popup.gctts-flip.hiding{
  animation: gcttsFadeOutUp 0.35s ease forwards;
}
@keyframes gcttsFadeInUp{
  0%{ opacity: 0; transform: translateY(-10px) scale(0.96); }
  100%{ opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes gcttsFadeOutUp{
  0%{ opacity: 1; transform: translateY(0) scale(1); }
  100%{ opacity: 0; transform: translateY(-10px) scale(0.96); }
}

@media (max-width: 520px){
  .gctts-popup{
    position: fixed;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    width: min(420px, calc(100vw - 24px));
    z-index: 999999;
    animation: none;
    transform: translate(-50%, -50%) scale(0.96);
  }
  .gctts-popup.show{
    animation: none;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  .gctts-popup.hiding{
    animation: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.96);
  }
}
