
/* v2.7.0: cursor-based older-message loader */
.wtpc-history-loader {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0 10px;
    text-align: center;
}

.wtpc-load-older,
.wtpc-history-state {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 6px 12px;
    font: 600 12px/1.3 Arial, sans-serif;
    background: rgba(96, 117, 139, 0.78);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.14);
}

.wtpc-load-older {
    cursor: pointer;
}

.wtpc-load-older:hover:not(:disabled) {
    background: rgba(75, 92, 116, 0.9);
}

.wtpc-load-older:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.wtpc-load-older:disabled {
    cursor: default;
    opacity: .85;
}

.wtpc-load-older.is-loading::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 7px;
    border: 2px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -1px;
    animation: wtpc-spin .75s linear infinite;
}

.wtpc-history-state {
    cursor: default;
    background: rgba(96, 117, 139, 0.55);
}

.wtpc-load-older[hidden],
.wtpc-history-state[hidden] {
    display: none !important;
}

@keyframes wtpc-spin {
    to { transform: rotate(360deg); }
}

.wtpc-no-messages {
    text-align: center;
    color: #fff;
    font-size: 14px;
}

body .telegram-chat-ui {
        width: 100% !important;
        height: 100dvh !important;
        margin: auto;
        padding: 20px;
        background: url("https://whalemenu.com/wp-content/uploads/2026/02/Telegram-Background-webp.webp")
           center center / cover no-repeat scroll !important;
        background-color: transparent !important;
        border-radius: 0px;
        font-family: Arial, sans-serif;
        overflow-y: auto;
        display: block;
        position: relative;
        overscroll-behavior: contain;
        scroll-behavior: auto;
    
        }

     .telegram-messages-wrapper {
        display: flex;
        flex-direction: column; /* newest messages appear at bottom */
        }   

    .telegram-message {
        display: flex;
        align-items: flex-end;
        margin-bottom: 8px;
    }
    .telegram-sender {
        font-size: 13px;
        line-height: 1.25;
        font-weight: 600;
        color: #168acd;
        margin: 0 0 3px;
    }
.telegram-bubble {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    width: fit-content;
    max-width: min(86%, 430px);
    min-width: 0 !important;
    background: #fff;
    padding: 7px 10px 5px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.16);
    border-radius: 15px 15px 15px 5px !important;
    overflow: hidden;
}

/* Visual Telegram posts are full-bleed: media touches the bubble edges while
 * sender/caption/meta keep their own internal spacing. */
.telegram-bubble--media {
    width: min(88%, 430px);
    max-width: min(88%, 430px);
    padding: 0;
}
.telegram-bubble--media .telegram-sender {
    margin: 0;
    padding: 7px 10px 5px;
}
.telegram-bubble--media .telegram-photo,
.telegram-bubble--media .telegram-video,
.telegram-bubble--media .tg-album-grid {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
}
.telegram-bubble--media .telegram-photo img,
.telegram-bubble--media .telegram-video video {
    width: 100%;
    border-radius: 0;
}
.telegram-bubble--media .telegram-caption {
    margin: 0;
    padding: 8px 10px 2px;
    line-height: 1.28;
}
.telegram-bubble--media.telegram-bubble--has-caption .telegram-meta {
    padding: 0 9px 6px;
}
.telegram-bubble--media:not(.telegram-bubble--has-caption) .telegram-meta {
    position: absolute;
    right: 7px;
    bottom: 6px;
    z-index: 3;
    gap: 6px;
    padding: 2px 5px;
    border-radius: 8px;
    background: rgba(0,0,0,.44);
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,.22);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}


.telegram-text {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 1px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", Arial, sans-serif;
}

.telegram-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: flex-end; /* pushes content to the right */
    gap: 8px; /* space between views and time */
}


.telegram-message-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}
.telegram-photo img,
.telegram-video video,
.telegram-audio audio {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}
.telegram-photo img,
.telegram-video video {
    cursor: zoom-in;
    max-height: 420px; /* avoid super tall media */
}


/* v2.10.5 video UX: videos autoplay muted when visible, but the Telegram-style
 * center affordance remains present and explicitly promotes the same playing
 * video element into native fullscreen. */
.wtpc-video-stage {
    position: relative;
    overflow: hidden;
    line-height: 0;
}
.wtpc-video-stage video {
    background: #111;
}
.wtpc-video-fullscreen {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 6;
    width: clamp(44px, 18%, 62px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(28, 31, 34, .58);
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.wtpc-video-fullscreen:hover,
.wtpc-video-fullscreen:focus-visible {
    background: rgba(28, 31, 34, .72);
}
.wtpc-video-fullscreen:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.wtpc-video-fullscreen__triangle {
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.15));
    pointer-events: none;
}

/* When the same inline element is promoted to native fullscreen, cancel the
 * feed/album cropping constraints so the complete video is visible. */
video:fullscreen,
video:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #000 !important;
}

/* Lightbox Styles */
.telegram-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999 !important;
}
.telegram-lightbox img,
.telegram-lightbox video {
    max-width: 90%;
    max-height: 90%;
}
.telegram-lightbox.active { display: flex; }


.telegram-document {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    max-width: 300px;
}
.telegram-doc-icon {
    width: 48px;
    height: 48px;
    background: #0088cc;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.telegram-doc-info {    
    margin-left: 10px;
}
.telegram-doc-name {
    font-weight: bold;
    font-size: 14px;
    color: #000;
}
.telegram-doc-size {
    font-size: 12px;
    color: #555;
}


/* Telegram Poll Styles */
.telegram-poll {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 12px;
    margin-top: 8px;
    font-family: inherit;
    max-width: 100%;
}

.telegram-poll-question {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 10px;
    color: #000;
}

.telegram-poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.telegram-poll-option {
    display: flex;
    flex-direction: column;
}

.telegram-poll-option-text {
    font-size: 14px;
    margin-bottom: 4px;
    color: #000;
}

.telegram-poll-progress {
    background: #e3e7ea;
    border-radius: 50px;
    height: 6px;
    overflow: hidden;
}

.telegram-poll-bar {
    height: 100%;
    background: #3390ec; /* Telegram Blue */
    border-radius: 50px;
    transition: width 0.3s ease;
}

.telegram-poll-percentage {
    font-size: 12px;
    color: #707579;
    margin-top: 2px;
}

.telegram-poll-footer {
    font-size: 12px;
    color: #707579;
    margin-top: 10px;
}

.telegram-audio-bubble {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    max-width: 300px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.15);
}

.telegram-audio-play-btn {
    background: #3390ec;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.telegram-audio-play-btn svg {
    pointer-events: none;
}

.telegram-audio-info {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
}

.telegram-audio-title {
    font-weight: bold;
    font-size: 14px;
    color: #000;
}

.telegram-audio-duration {
    font-size: 12px;
    color: #777;
}

.telegram-sticker {
  padding: 10px;
  display: inline-block;
  transition: transform .15s ease, filter .15s ease;
}
.telegram-sticker:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}
/* Give Lottie a box to draw into */
.lottie-sticker {
  width: 150px;
  height: 150px;
}
.telegram-sticker img,
.telegram-sticker video,
.telegram-sticker svg,
.telegram-sticker canvas {
  max-width: 150px;
  max-height: 150px;
  display: block;
}

.telegram-caption {
    margin-top: 4px;
    font-size: 14px;
    color: #000000;
    line-height: 1.28;
    white-space: pre-wrap;
}

/* === v2.10.2 Telegram Exact Album Layout === */
.tg-album-grid {
    --tg-album-gap: 2px;
    --tg-album-aspect: 1;
    display: grid;
    width: 100%;
    max-width: 100%;
    gap: var(--tg-album-gap);
    margin: 0;
    overflow: hidden;
    border-radius: 0;
    background: #fff;
    isolation: isolate;
}

.tg-album-grid .tg-media {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #cfd7dd;
    line-height: 0;
}

.tg-album-grid .tg-media img,
.tg-album-grid .tg-media video {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    object-position: center center;
    cursor: zoom-in;
    border: 0;
    border-radius: 0;
    margin: 0;
}

/* Telegram's album tiles behave as one clipped composition. Inner tiles do not
 * receive independent rounding; the surrounding message bubble clips the outer
 * silhouette and the 2px seams remain perfectly continuous. */
.telegram-bubble--album .tg-album-grid,
.telegram-bubble--album .tg-media,
.telegram-bubble--album .tg-media img,
.telegram-bubble--album .tg-media video {
    border-radius: 0 !important;
}

/* One-item historical edge case. Telegram media groups normally contain 2-10. */
.tg-album-count-1 {
    grid-template-columns: 1fr;
    aspect-ratio: 4 / 3;
}

/* 2 items. Historical albums frequently lack dimensions, so v2.10.2 uses a
 * taller Telegram-like fallback instead of the old website-style 2:1 strip. */
.tg-album-count-2 {
    aspect-ratio: var(--tg-album-aspect, 1.45);
}
.tg-album-count-2.tg-album-layout-split,
.tg-album-count-2.tg-album-layout-mixed,
.tg-album-count-2.tg-album-layout-balanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
}
.tg-album-count-2.tg-album-layout-stacked {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

/* 3 items — mirrors the Telegram composition in the supplied reference:
 * one tall dominant tile at left and two stacked tiles at right. Portrait-led
 * groups deliberately become taller than they are wide. */
.tg-album-count-3 {
    aspect-ratio: var(--tg-album-aspect, .78);
}
.tg-album-count-3.tg-album-layout-hero-left {
    grid-template-columns: var(--tg-album-hero, 2.12fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
}
.tg-album-count-3.tg-album-layout-hero-left .tg-media:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / 3;
}
.tg-album-count-3.tg-album-layout-hero-left .tg-media:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}
.tg-album-count-3.tg-album-layout-hero-left .tg-media:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}
.tg-album-count-3.tg-album-layout-hero-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1.25fr 1fr;
    aspect-ratio: var(--tg-album-aspect, 1.18);
}
.tg-album-count-3.tg-album-layout-hero-top .tg-media:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1;
}

/* 4 items: Telegram-style 2x2 composition. */
.tg-album-count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    aspect-ratio: var(--tg-album-aspect, 1);
}

/* 5 items: large left hero + four supporting tiles. */
.tg-album-count-5 {
    grid-template-columns: 1.35fr repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    aspect-ratio: 5 / 3;
}
.tg-album-count-5 .tg-media:first-child {
    grid-row: 1 / 3;
}

/* 6 items: balanced 3x2. */
.tg-album-count-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    aspect-ratio: 3 / 2;
}

/* 7 items: big hero + supporting mosaic. */
.tg-album-count-7 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    aspect-ratio: 4 / 3;
}
.tg-album-count-7 .tg-media:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
.tg-album-count-7 .tg-media:nth-child(2) { grid-column: 3 / 5; grid-row: 1; }
.tg-album-count-7 .tg-media:nth-child(3) { grid-column: 3 / 5; grid-row: 2; }

/* 8 items: compact 4x2 mosaic. */
.tg-album-count-8 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    aspect-ratio: 16 / 9;
}

/* 9 items: balanced 3x3. */
.tg-album-count-9 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    aspect-ratio: 1 / 1;
}

/* 10 items: wide lead row followed by a dense 4x2 grid. */
.tg-album-count-10 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: 1.25fr repeat(2, minmax(0, 1fr));
    aspect-ratio: 4 / 3;
}
.tg-album-count-10 .tg-media:nth-child(1) { grid-column: 1 / 3; }
.tg-album-count-10 .tg-media:nth-child(2) { grid-column: 3 / 5; }

/* Telegram-like video tile: no browser-native controls inside the mosaic. The
 * video remains clickable and opens the existing secure full-screen viewer. */
.tg-media--video video {
    background: #89939b;
}
.tg-album-play {
    z-index: 6;
}
.tg-album-play__triangle {
    pointer-events: none;
}
.tg-album-duration {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 3;
    padding: 2px 5px;
    border-radius: 5px;
    background: rgba(0,0,0,.58);
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: .01em;
    pointer-events: none;
}

/* New dimensions are captured from Telegram; old albums simply fall back to
 * the count layout. */
.tg-album-grid .tg-media-portrait img,
.tg-album-grid .tg-media-portrait video,
.tg-album-grid .tg-media-landscape img,
.tg-album-grid .tg-media-landscape video {
    object-position: center center;
}

/* Album-aware lightbox controls. */
.telegram-lightbox .wtpc-album-nav {
    position: fixed;
    top: 50%;
    z-index: 2;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.52);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.telegram-lightbox .wtpc-album-prev { left: 18px; }
.telegram-lightbox .wtpc-album-next { right: 18px; }
.telegram-lightbox .wtpc-album-counter {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 13px;
    line-height: 1;
}
.telegram-lightbox .wtpc-lightbox-close {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    right: 16px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .telegram-bubble { max-width: 88%; }
    .telegram-bubble--media { width: 90%; max-width: 90%; }
    .tg-album-grid { --tg-album-gap: 2px; border-radius: 0; }
    .tg-album-count-5 { aspect-ratio: 4 / 3; }
    .tg-album-count-6,
    .tg-album-count-8 { aspect-ratio: 4 / 3; }
    .tg-album-count-10 { aspect-ratio: 1 / 1; }
    .tg-album-count-3.tg-album-layout-hero-left { min-height: 300px; }
    .telegram-lightbox .wtpc-album-nav {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
    .telegram-lightbox .wtpc-album-prev { left: 8px; }
    .telegram-lightbox .wtpc-album-next { right: 8px; }
}

/* Telegram-style date separator */
.telegram-date-separator {
  display: table; /* keeps it centered */
  margin: 20px auto 12px; /* spacing above and below */
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #a0b1c7; /* Telegram’s grey-blue bubble */
  border-radius: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15); /* subtle lift */
  text-align: center;
  white-space: nowrap; /* prevent line break inside date */
  letter-spacing: 0.3px;
}

/* Add some variation for dark mode (if your site has it) */
@media (prefers-color-scheme: dark) {
  .telegram-date-separator {
    background: #4b5c74; /* darker bubble in dark mode */
  }
}

/* Fix iPhone showing extra white space around the chat area */
@supports (-webkit-touch-callout: none) {
  body, html {
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden; /* prevent body scrolling */
  }

  .telegram-chat-ui {
    height: 100vh !important; /* force real viewport height */
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: scroll !important; /* scrolling stays inside the chat UI */
    padding-bottom: 20px; /* keep your existing padding feel */
  }
}



/* If the plugin dumps a <style> tag inside the feed, hide it */
.wtpc-feed style { display: none !important; }

/* === v2.8 Telegram entity formatting === */
.telegram-rich-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.telegram-rich-text p {
  margin: 0 0 0.6em;
}
.telegram-rich-text p:last-child {
  margin-bottom: 0;
}

.telegram-entity-link,
.telegram-mention,
.telegram-hashtag,
.telegram-cashtag {
  color: #168acd;
  text-decoration: none;
}
.telegram-entity-link:hover,
.telegram-mention:hover {
  text-decoration: underline;
}

.telegram-inline-code,
.telegram-bot-command {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 5px;
  padding: 1px 4px;
}

.telegram-pre {
  display: block;
  max-width: 100%;
  margin: 6px 0;
  padding: 9px 10px;
  overflow-x: auto;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre;
}
.telegram-pre code {
  padding: 0;
  background: transparent;
  white-space: inherit;
}

.telegram-blockquote {
  margin: 6px 0;
  padding: 2px 0 2px 10px;
  border-left: 3px solid #3390ec;
  color: inherit;
}

.telegram-blockquote-expandable {
  position: relative;
  max-height: 5.4em;
  overflow: hidden;
  transition: max-height 0.2s ease;
}
.telegram-blockquote-expandable.is-expanded {
  max-height: none;
}
.telegram-blockquote-expandable:not(.is-expanded)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.8em;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
  pointer-events: none;
}
.wtpc-expand-quote {
  display: inline-flex;
  align-items: center;
  margin: 2px 0 5px 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #168acd;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.telegram-spoiler {
  border-radius: 4px;
  background: #8f969d;
  color: transparent;
  text-shadow: none;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.telegram-spoiler * {
  visibility: hidden;
}
.telegram-spoiler.is-revealed {
  background: rgba(143, 150, 157, 0.18);
  color: inherit;
  user-select: text;
}
.telegram-spoiler.is-revealed * {
  visibility: visible;
}
.telegram-spoiler:focus-visible {
  outline: 2px solid #3390ec;
  outline-offset: 2px;
}

.telegram-custom-emoji {
  display: inline;
}


/* v2.10 Access Control */
.wtpc-access-denied {
    max-width: 620px;
    margin: 20px auto;
    padding: 22px 24px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    font-family: Arial, sans-serif;
}
.wtpc-access-denied strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
    color: #111;
}
.wtpc-access-denied p {
    margin: 0 0 14px;
    color: #555;
    line-height: 1.5;
}
.wtpc-access-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: #3390ec;
    color: #fff !important;
    font-weight: 600;
    text-decoration: none !important;
}
.wtpc-access-login:hover,
.wtpc-access-login:focus {
    opacity: .9;
}

/* === v2.10.7 Instant Media UX ============================================
 * Never show an empty white media rectangle while Telegram/WordPress is still
 * delivering bytes. Reserve geometry up front, paint a Telegram-like neutral
 * surface immediately, and fade real media in when it is ready. */
.wtpc-media-shell,
.telegram-photo,
.wtpc-video-stage,
.tg-album-grid .tg-media {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #7f8d96 0%, #66757f 48%, #596872 100%);
}

.wtpc-media-shell::before,
.telegram-photo::before,
.wtpc-video-stage::before,
.tg-album-grid .tg-media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(110deg, rgba(255,255,255,.03) 24%, rgba(255,255,255,.16) 38%, rgba(255,255,255,.03) 52%);
    background-size: 220% 100%;
    animation: wtpc-media-shimmer 1.35s linear infinite;
    transition: opacity .18s ease;
}

.wtpc-media-shell--ready::before,
.wtpc-media-shell--error::before {
    opacity: 0;
    animation: none;
}

@keyframes wtpc-media-shimmer {
    from { background-position: 140% 0; }
    to   { background-position: -80% 0; }
}

.wtpc-media-image,
.telegram-photo img,
.tg-album-grid .tg-media img {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity .16s ease;
    background: transparent;
}

.wtpc-media-image.wtpc-media-ready,
.telegram-photo img.wtpc-media-ready,
.tg-album-grid .tg-media img.wtpc-media-ready {
    opacity: 1;
}

/* Reserve a real video box before either poster or video bytes arrive. This is
 * intentionally dark rather than white so a cold video still looks like a
 * Telegram media tile. */
.wtpc-video-stage {
    width: 100%;
    max-height: 420px;
    min-height: 150px;
    line-height: 0;
    background: radial-gradient(circle at 50% 42%, #53636d 0%, #34434d 52%, #24323b 100%);
}

.wtpc-video-stage video,
.tg-media--video video {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent !important;
}

/* Subtle loading ring behind the persistent fullscreen/play affordance. */
.wtpc-video-wait {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: clamp(62px, 23%, 80px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255,255,255,.17);
    border-top-color: rgba(255,255,255,.68);
    border-radius: 50%;
    animation: wtpc-video-wait-spin 1.05s linear infinite;
    pointer-events: none;
    transition: opacity .18s ease;
}

.wtpc-media-shell--ready .wtpc-video-wait {
    opacity: 0;
    animation: none;
}

@keyframes wtpc-video-wait-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Keep the user's requested center icon visible above both placeholder and
 * playing video. */
.wtpc-video-fullscreen,
.tg-album-play {
    z-index: 7;
}

/* Avoid motion-heavy placeholders for users who request reduced motion. */
@media (prefers-reduced-motion: reduce) {
    .wtpc-media-shell::before,
    .telegram-photo::before,
    .wtpc-video-stage::before,
    .tg-album-grid .tg-media::before,
    .wtpc-video-wait {
        animation: none !important;
    }
}

/* v2.12.4 Native Video Delivery Fix
 * Native Media Library videos should never look like they are "loading forever"
 * while they are intentionally poster-only. Show the wait ring only after the
 * inline MP4 request has actually started. */
.wtpc-native-video .wtpc-video-wait {
    opacity: 0;
    animation: none;
}
.wtpc-native-video.wtpc-video-stage--loading .wtpc-video-wait,
.wtpc-native-video.wtpc-video-stage--loading > .wtpc-video-wait {
    opacity: 1;
    animation: wtpc-video-wait-spin 1.05s linear infinite;
}
.wtpc-native-video.wtpc-media-shell--ready .wtpc-video-wait,
.wtpc-native-video.wtpc-video-stage--loading.wtpc-media-shell--ready .wtpc-video-wait {
    opacity: 0;
    animation: none;
}
