/* re_comgate – patička, volby v košíku, výsledek platby a děkovná stránka */

.re-comgate-footer { text-align: center; padding: 10px 0; }
.re-comgate-footer img { max-width: 100%; height: auto; max-height: 40px; }

/* ---------- karta výsledku platby ---------- */

.re-comgate-card {
    --rc-accent: #2f6fd6;
    --rc-tint: #eef4fd;
    max-width: 680px;
    margin: 20px auto 30px;
    padding: 32px 32px 24px;
    background: #fff;
    border: 1px solid #e3e6ea;
    border-top: 4px solid var(--rc-accent);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    text-align: center;
    color: #333;
}
.re-comgate-card--success { --rc-accent: #1f9d55; --rc-tint: #e8f6ee; }
.re-comgate-card--pending { --rc-accent: #2f6fd6; --rc-tint: #eef4fd; }
.re-comgate-card--error { --rc-accent: #e07800; --rc-tint: #fdf3e6; }

.re-comgate-card--inline {
    max-width: none;
    margin: 15px 0;
    text-align: left;
}

.re-comgate-card__icon { margin: 0 auto 14px; width: 64px; height: 64px; }
.re-comgate-card__icon svg,
.re-comgate-banner__icon { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.re-comgate-card__icon circle { fill: var(--rc-tint); stroke: var(--rc-accent); stroke-width: 2; }
.re-comgate-card__icon path { stroke: var(--rc-accent); stroke-width: 3.5; }
.re-comgate-card--pending .re-comgate-card__icon path { transform-origin: 24px 24px; animation: re-comgate-tick 6s linear infinite; }

.re-comgate-card h1.re-comgate-card__title,
.re-comgate-card h2.re-comgate-card__title {
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    font-size: 24px;
    line-height: 1.25;
    text-transform: none;
    color: #222;
}
.re-comgate-card--inline h2.re-comgate-card__title { font-size: 20px; }
.re-comgate-card__text { margin: 0 auto 18px; max-width: 560px; font-size: 15px; line-height: 1.6; }
.re-comgate-card--inline .re-comgate-card__text { max-width: none; margin-left: 0; }

.re-comgate-card__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin: 20px 0 6px; }
.re-comgate-card--inline .re-comgate-card__actions { justify-content: flex-start; }
.re-comgate-card__actions .button { margin: 0; }
.re-comgate-link { text-decoration: underline; }
.re-comgate-card__help { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid #eef0f2; font-size: 13px; color: #777; }

/* ---------- průběžná kontrola stavu: kroužek s odpočtem ---------- */

.re-comgate-poll {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    margin: 16px 0 6px;
}
.re-comgate-card--inline .re-comgate-poll { justify-content: flex-start; }

.re-comgate-poll__ring { position: relative; flex: 0 0 56px; width: 56px; height: 56px; }
.re-comgate-poll__svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); fill: none; }
.re-comgate-poll__track { stroke: var(--rc-tint, #eef4fd); stroke-width: 4; }
.re-comgate-poll__arc { stroke: var(--rc-accent, #2f6fd6); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.re-comgate-poll__count {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: var(--rc-accent, #2f6fd6);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.re-comgate-poll__check {
    position: absolute;
    inset: 14px;
    display: none;
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ověřování – točící se oblouk */
.re-comgate-poll.is-checking .re-comgate-poll__svg { animation: re-comgate-spin .9s linear infinite; }
.re-comgate-poll.is-checking .re-comgate-poll__arc { stroke-dasharray: 30 120 !important; stroke-dashoffset: 0 !important; transition: none; }

/* zaplaceno – zelený kroužek s fajfkou */
.re-comgate-poll.is-paid .re-comgate-poll__svg { animation: none; }
.re-comgate-poll.is-paid .re-comgate-poll__track { stroke: #1f9d55; fill: #1f9d55; }
.re-comgate-poll.is-paid .re-comgate-poll__arc,
.re-comgate-poll.is-paid .re-comgate-poll__count { display: none; }
.re-comgate-poll.is-paid .re-comgate-poll__check { display: block; }

/* tlačítko „zkontrolovat hned“ */
.re-comgate-poll__now {
    width: 36px;
    height: 36px;
    padding: 7px;
    border: 1px solid #d5dbe3;
    border-radius: 50%;
    background: #fff;
    color: var(--rc-accent, #2f6fd6);
    cursor: pointer;
    line-height: 0;
}
.re-comgate-poll__now:hover { border-color: var(--rc-accent, #2f6fd6); }
.re-comgate-poll__now svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.re-comgate-poll.is-checking .re-comgate-poll__now,
.re-comgate-poll.is-done .re-comgate-poll__now,
.re-comgate-poll.is-paid .re-comgate-poll__now { visibility: hidden; }

/* text jen pro čtečky; viditelně až po zastavení automatické kontroly */
.re-comgate-poll__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.re-comgate-poll.is-stopped .re-comgate-poll__text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    flex: 1 1 260px;
    font-size: 13px;
    color: #666;
}
.re-comgate-poll.is-stopped .re-comgate-poll__arc { stroke-dashoffset: 0 !important; stroke: #c9ced6; }

/* ---------- upozornění „pokud jste již zaplatili“ ---------- */

.re-comgate-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 560px;
    margin: 12px auto 4px;
    padding: 10px 14px;
    background: #f6f8fa;
    border-left: 3px solid var(--rc-accent, #2f6fd6);
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    text-align: left;
}
.re-comgate-card--inline .re-comgate-hint { max-width: none; margin-left: 0; }
.re-comgate-hint__icon { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--rc-accent, #2f6fd6); stroke-width: 2; stroke-linecap: round; }

/* ---------- pruh na děkovné stránce ---------- */

.re-comgate-confirmation { margin-top: 15px; }
.re-comgate-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 6px; font-size: 15px; font-weight: bold; }
.re-comgate-banner--success { background: #e8f6ee; color: #17663a; border: 1px solid #bfe5cf; }
.re-comgate-banner__icon { flex: 0 0 28px; width: 28px; height: 28px; }
.re-comgate-banner__icon circle { fill: #1f9d55; stroke: none; }
.re-comgate-banner__icon path { stroke: #fff; stroke-width: 4; }

@keyframes re-comgate-spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
@keyframes re-comgate-tick { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
    .re-comgate-card { padding: 24px 16px 18px; }
    .re-comgate-card h1.re-comgate-card__title { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .re-comgate-card__icon path { animation: none; }
    .re-comgate-poll.is-checking .re-comgate-poll__svg { animation-duration: 3s; }
}
