.kop-pod,
.kop-pod * {
    box-sizing: border-box;
}

.kop-pod {
    --kop-pod-navy: #10284a;
    --kop-pod-blue: #0b6ca8;
    --kop-pod-teal: #1aa59a;
    --kop-pod-border: #d9e1ea;
    --kop-pod-muted: #667085;
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 12px;
    overflow: hidden;
    color: var(--kop-pod-navy);
    background: #fff;
    border: 1px solid var(--kop-pod-border);
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(16, 40, 74, .08);
}

.kop-pod__header {
    display: block;
    min-width: 0;
    margin-bottom: 8px;
    text-align: center;
}

.kop-pod__title {
    position: relative;
    max-width: 100%;
    margin: 0;
    padding: 0 0 6px;
    overflow: hidden;
    color: var(--kop-pod-navy);
    font-size: clamp(11px, 1.05vw, 14px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: .035em;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kop-pod__title::after {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 42px;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, var(--kop-pod-blue), var(--kop-pod-teal));
    border-radius: 99px;
    transform: translateX(-50%);
}

.kop-pod__actions {
    display: flex;
    min-width: 0;
    margin-top: 8px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--kop-pod-muted);
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
}

.kop-pod__hint {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kop-pod__refresh {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 24px;
    padding: 2px 0 2px 9px;
    color: var(--kop-pod-blue);
    font: inherit;
    font-size: inherit;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-left: 1px solid #d5dde6;
    border-radius: 0;
    transition: color .18s ease, opacity .18s ease;
}

.kop-pod__refresh:hover {
    color: var(--kop-pod-navy);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kop-pod__refresh:focus-visible,
.kop-pod__image-button:focus-visible,
.kop-pod-modal__close:focus-visible {
    outline: 3px solid rgba(11, 108, 168, .28);
    outline-offset: 2px;
}

.kop-pod__refresh svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.kop-pod.is-loading .kop-pod__refresh svg {
    animation: kop-pod-spin .7s linear infinite;
}

.kop-pod.is-loading .kop-pod__refresh {
    pointer-events: none;
    opacity: .62;
}

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

.kop-pod__image-button {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    cursor: zoom-in;
    background: #edf2f6;
    border: 0;
    border-radius: 11px;
}

.kop-pod__image-shell {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 190px;
    max-height: 520px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(11, 108, 168, .05), rgba(26, 165, 154, .06)),
        #f3f6f9;
}

.kop-pod__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    transition: transform .25s ease, opacity .2s ease;
}

.kop-pod__image-button:hover .kop-pod__image {
    transform: scale(1.015);
}

.kop-pod.is-loading .kop-pod__image {
    opacity: .55;
}

.kop-pod__zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: grid;
    width: 38px;
    height: 38px;
    color: #fff;
    background: rgba(16, 40, 74, .82);
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .18);
    place-items: center;
    backdrop-filter: blur(5px);
}

.kop-pod__zoom svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.kop-pod__status {
    min-height: 0;
    margin: 0;
    color: #9b1c1c;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
}

.kop-pod__status:not(:empty) {
    margin-top: 8px;
}

.kop-pod-modal[hidden] {
    display: none !important;
}

.kop-pod-modal {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: grid;
    padding: 22px;
    place-items: center;
}

.kop-pod-modal__backdrop {
    position: absolute;
    background: rgba(3, 11, 24, .89);
    inset: 0;
    backdrop-filter: blur(7px);
}

.kop-pod-modal__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(96vw, 1280px);
    height: min(92vh, 1000px);
    padding: 12px;
    overflow: hidden;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
    place-items: center;
}

.kop-pod-modal__image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(92vh - 24px);
    object-fit: contain;
}

.kop-pod-modal__close {
    position: absolute;
    z-index: 2;
    top: 18px;
    right: 18px;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #fff;
    cursor: pointer;
    background: rgba(16, 40, 74, .9);
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .25);
    place-items: center;
}

.kop-pod-modal__close svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

body.kop-pod-modal-open {
    overflow: hidden;
}

.kop-pod-error {
    padding: 12px 14px;
    color: #8a2424;
    background: #fff2f2;
    border: 1px solid #e4b7b7;
    border-radius: 8px;
}

@media (max-width: 520px) {
    .kop-pod {
        padding: 10px;
        border-radius: 12px;
    }

    .kop-pod__title {
        font-size: clamp(10px, 3.35vw, 12px);
        letter-spacing: .02em;
    }

    .kop-pod__actions {
        gap: 6px;
        font-size: clamp(9px, 2.9vw, 11px);
    }

    .kop-pod__refresh {
        min-height: 22px;
        padding-left: 7px;
    }

    .kop-pod__refresh svg {
        width: 13px;
        height: 13px;
    }

    .kop-pod__image-shell {
        min-height: 160px;
    }

    .kop-pod-modal {
        padding: 10px;
    }

    .kop-pod-modal__dialog {
        width: 100%;
        height: 94vh;
        padding: 8px;
        border-radius: 11px;
    }

    .kop-pod-modal__image {
        max-height: calc(94vh - 16px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .kop-pod *,
    .kop-pod *::before,
    .kop-pod *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
