/* Device Preview Widget v4 — dpp/assets/style.css */

/* ── Outer wrapper: FULLY self-contained, never bleeds ── */
.dpp-wrap {
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;          /* critical: clips anything that tries to escape */
    padding: 1.5rem 1rem 1rem;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.dpp-wrap *, .dpp-wrap *::before, .dpp-wrap *::after {
    box-sizing: border-box;
}

/* ── Badge ── */
.dpp-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 3px 13px;
    border-radius: 20px;
    margin-bottom: 1rem;
    background: #e8f4f0;
    color: #1a6b50;
}

/* ── Scene: SVG-based, percentage width, never overflows ── */
.dpp-scene {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    /* height set by JS based on SVG aspect ratio */
}

/* The SVG fills the scene completely */
.dpp-scene > svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Screenshot images clipped inside SVG foreignObject */
.dpp-screen-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
}

/* Placeholder inside screen */
.dpp-ph {
    width: 100%;
    height: 100%;
    background: #f0f0f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    color: #bbb;
    font-size: 11px;
    text-align: center;
    padding: 8px;
    line-height: 1.4;
}

/* ── Info ── */
.dpp-info {
    margin-top: 1.6rem;
}
.dpp-info__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 .4rem;
    line-height: 1.3;
}
.dpp-info__desc {
    font-size: .9rem;
    color: #666;
    margin: 0 auto .8rem;
    max-width: 520px;
    line-height: 1.6;
}
.dpp-info__link {
    display: inline-block;
    background: #1a6b50;
    color: #fff !important;
    text-decoration: none !important;
    font-size: .88rem;
    font-weight: 600;
    padding: 9px 22px;
    border-radius: 7px;
    transition: background .18s, transform .12s;
}
.dpp-info__link:hover {
    background: #145c43;
    transform: translateY(-1px);
}

/* ── Clickable scene ── */
.dpp-scene--link {
    display: block;
    text-decoration: none !important;
    cursor: pointer;
    position: relative;
    border-radius: 4px;
    transition: transform .2s ease, opacity .2s ease;
}

/* Subtle lift on hover — devices feel interactive */
.dpp-scene--link:hover {
    transform: translateY(-4px);
    opacity: .93;
}

/* Thin teal ring appears around the whole scene on hover */
.dpp-scene--link::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 8px;
    border: 0px solid transparent;
    transition: border-color .2s ease;
    pointer-events: none;
}
.dpp-scene--link:hover::after {
    border-color: rgba(26, 107, 80, 0.35);
}

/* "Open ↗" tooltip that appears on hover */
.dpp-scene--link::before {
    content: 'Open project ↗';
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(26, 107, 80, 0.92);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .03em;
    padding: 5px 10px;
    border-radius: 5px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
}
.dpp-scene--link:hover::before {
    opacity: 1;
    transform: translateY(0);
}
