.webcom-container {
    width: min(100%, var(--webcom-desktop-width, 900px));
    max-width: var(--webcom-desktop-width, 900px);
    margin: 25px auto;
    background: #111;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    direction: rtl;
}

.webcom-container:focus-visible,
.webcom-btn:focus-visible {
    outline: 3px solid #4da3ff;
    outline-offset: 3px;
}

.webcom-title {
    text-align: center;
    color: #f0f0f0;
    margin-bottom: 14px;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.webcom-screen {
    position: relative;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    height: var(--webcom-desktop-height, 506px);
    aspect-ratio: auto;
    border: 8px solid #1f1f1f;
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.85);
    touch-action: pan-y;
}

.webcom-screen .webcom-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.webcom-screen .webcom-slide.active {
    opacity: 1;
    visibility: visible;
}

.webcom-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.webcom-btn {
    background: #2c2c2c;
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.webcom-btn:hover {
    background: #444;
    transform: translateY(-1px);
}

.webcom-btn:active {
    transform: translateY(0);
}

.webcom-btn.webcom-playing {
    background: #c0392b;
}

.webcom-btn.webcom-playing:hover {
    background: #e74c3c;
}

.webcom-counter {
    text-align: center;
    color: #b0b0b0;
    font-size: 13px;
    margin-top: 12px;
}

.webcom-stand {
    width: 130px;
    height: 16px;
    background: #2a2a2a;
    margin: 10px auto 0;
    border-radius: 0 0 10px 10px;
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 600px) {
    .webcom-container {
        margin: 15px 10px;
        padding: 12px;
        border-radius: 16px;
    }

    .webcom-title {
        font-size: 1.1rem;
    }

    .webcom-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .webcom-screen .webcom-slide,
    .webcom-btn {
        transition: none;
    }
}


/* YouTube embeds fill the same responsive TV frame as other media. */
.webcom-youtube { position:absolute; inset:0; width:100%; height:100%; background:#000; }
.webcom-youtube iframe { display:block; width:100%; height:100%; border:0; }
.webcom-slide.webcom-youtube { object-fit:contain; }

/* Responsive dimensions configured per screen. */
.webcom-container, .webcom-screen { box-sizing: border-box; }
@media (max-width: 600px) {
  .webcom-container { width: var(--webcom-mobile-width, 100%); max-width: var(--webcom-mobile-width, 100%); margin-left:auto; margin-right:auto; }
  .webcom-screen { height: var(--webcom-mobile-height, 240px); }
}
