/* Shared phone mockup styles (used by both product and viewer pages) */

.tdm-phone-frame {
    position: relative;
    width: var(--tdm-phone-width, 230px);
    height: var(--tdm-phone-height, 420px);
    background: #111;
    border-radius: 36px;
    box-shadow: var(--tdm-phone-shadow, 0 16px 30px rgba(15, 23, 42, 0.28));
    padding: 10px;
    border: 2px solid #333;
    margin-top: var(--tdm-phone-margin-top, 0);
}

.tdm-phone-frame-has-custom {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.tdm-phone-frame::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 76px;
    height: 18px;
    background: #111;
    border-radius: 0 0 12px 12px;
    z-index: 10;
}

.tdm-phone-frame-has-custom::before {
    display: none;
}

.tdm-phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: #eee;
    border-radius: 28px;
    overflow: hidden;
}

.tdm-phone-frame-has-custom .tdm-phone-screen {
    position: absolute;
    inset: var(--tdm-phone-screen-inset, 2.2% 6.8% 2.4% 6.8%);
    width: auto;
    height: auto;
    border-radius: 24px;
    z-index: 2;
}

.tdm-phone-device-base {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    pointer-events: none;
    z-index: 1;
}

.tdm-phone-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tdm-phone-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    background: #f0f0f0;
}

.tdm-phone-city-label {
    position: absolute;
    top: 12px;
    right: 12px;
    left: 12px;
    z-index: 4;
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.75);
    pointer-events: none;
}

.tdm-phone-slider {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 28px;
}

.tdm-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.tdm-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.tdm-slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 20px;
    z-index: 5;
    display: none;
}

.tdm-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.tdm-slider-dot.active {
    background: #fff;
    transform: scale(var(--tdm-slider-dot-active-scale, 1.2));
}

#tdm-phone-placeholder.tdm-hidden {
    display: none;
}

#tdm-phone-slider.tdm-hidden {
    display: none;
}