.pvh-video-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
}

.pvh-video-debug-tool {
    display: contents;
}

.pvh-video-debug-tool[data-mode="page"] {
    display: block;
}

.pvh-video-debug-toggle {
    justify-self: end;
    appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #0f172a;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pvh-video-debug-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
    border-color: rgba(37, 99, 235, 0.22);
}

.pvh-video-debug-tool[data-mode="page"] .pvh-video-debug-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100001;
    width: 58px;
    height: 58px;
    justify-self: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
    border-color: rgba(249, 115, 22, 0.22);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.pvh-video-debug-toggle-icon {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: #f97316;
}

.pvh-video-debug-panel {
    grid-column: 1 / -1;
    margin-top: 16px;
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.09), transparent 28%),
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 22%),
        #ffffff;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.12);
    padding: 22px;
}

.pvh-video-debug-tool[data-mode="page"] .pvh-video-debug-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(560px, 100vw);
    height: 100vh;
    margin-top: 0;
    border-radius: 0;
    border-right: 0;
    border-top: 0;
    border-bottom: 0;
    padding: 24px;
    overflow-y: auto;
    z-index: 100002;
    animation: pvh-video-debug-slide-in 0.22s ease;
}

@keyframes pvh-video-debug-slide-in {
    from {
        opacity: 0;
        transform: translateX(18px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.pvh-video-debug-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.pvh-video-debug-eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
}

.pvh-video-debug-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
    color: #0f172a;
}

.pvh-video-debug-subtitle {
    margin: 10px 0 0;
    max-width: 760px;
    color: #475569;
    font-size: 14px;
    line-height: 1.65;
}

.pvh-video-debug-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pvh-video-debug-actions button {
    appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    color: #0f172a;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.pvh-video-debug-actions button:hover {
    background: #f8fafc;
    border-color: rgba(37, 99, 235, 0.22);
    transform: translateY(-1px);
}

.pvh-video-debug-actions button:disabled,
.pvh-video-debug-card-copy:disabled {
    cursor: default;
    opacity: 0.78;
    transform: none;
}

.pvh-video-debug-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.pvh-video-debug-summary-item {
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.92);
    padding: 14px 16px;
}

.pvh-video-debug-summary-item[data-tone="good"] {
    background: rgba(236, 253, 245, 0.96);
    border-color: rgba(16, 185, 129, 0.18);
}

.pvh-video-debug-summary-item[data-tone="warn"] {
    background: rgba(255, 251, 235, 0.96);
    border-color: rgba(245, 158, 11, 0.18);
}

.pvh-video-debug-summary-item[data-tone="bad"] {
    background: rgba(254, 242, 242, 0.96);
    border-color: rgba(239, 68, 68, 0.18);
}

.pvh-video-debug-summary-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
}

.pvh-video-debug-summary-value {
    display: block;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.pvh-video-debug-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.pvh-video-debug-card {
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.pvh-video-debug-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.pvh-video-debug-card h4 {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
}

.pvh-video-debug-card-copy {
    appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    color: #0f172a;
    border-radius: 999px;
    padding: 8px 12px;
    min-width: 74px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.pvh-video-debug-card-copy:hover {
    background: #f8fafc;
    border-color: rgba(37, 99, 235, 0.22);
    transform: translateY(-1px);
}

.pvh-video-debug-pre {
    margin: 0;
    min-height: 180px;
    max-height: 420px;
    overflow: auto;
    border-radius: 16px;
    background: #0f172a;
    color: #dbeafe;
    padding: 14px;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 900px) {
    .pvh-video-title-row {
        grid-template-columns: 1fr;
    }

    .pvh-video-debug-toggle {
        justify-self: start;
    }

    .pvh-video-debug-panel {
        padding: 18px;
        border-radius: 20px;
    }

    .pvh-video-debug-tool[data-mode="page"] .pvh-video-debug-panel {
        width: 100vw;
        padding: 18px;
        border-radius: 0;
    }

    .pvh-video-debug-panel-header {
        flex-direction: column;
    }

    .pvh-video-debug-actions {
        justify-content: flex-start;
    }

    .pvh-video-debug-summary,
    .pvh-video-debug-grid {
        grid-template-columns: 1fr;
    }

    .pvh-video-debug-tool[data-mode="page"] .pvh-video-debug-toggle {
        right: 14px;
        bottom: 14px;
        width: 52px;
        height: 52px;
    }
}
