/* مشغّل فيديو Drive الخاص (assets/drive-player.js). كل القواعد تحت .rw-dp فلا تمسّ بقية الموقع. */
.rw-dp { background: #000; color: #fff; overflow: hidden; outline: none; user-select: none; -webkit-user-select: none; --dp-a: var(--rw-gold, #c79632); }
.rw-dp:focus-visible { box-shadow: 0 0 0 3px var(--rw-gold, #c79632) inset; }
.rw-dp video { object-fit: contain; background: #000; }
.rw-dp__layer { position: absolute; inset: 0; direction: ltr; }
.rw-dp__layer [hidden] { display: none !important; }
.rw-dp__surface { position: absolute; inset: 0; z-index: 1; touch-action: manipulation; cursor: pointer; }
.rw-dp.is-idle { cursor: none; }
.rw-dp.is-idle .rw-dp__ui { opacity: 0; pointer-events: none; transform: translateY(6px); }

.rw-dp__center { position: absolute; z-index: 3; top: 50%; left: 50%; translate: -50% -50%; width: 68px; height: 68px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
	color: #fff; background: rgba(0,0,0,.58); box-shadow: 0 0 0 2px rgba(255,255,255,.25); transition: transform .15s, background .15s; }
.rw-dp__center svg { width: 34px; height: 34px; margin-inline-start: 3px; }
.rw-dp__center:hover { background: var(--dp-a); color: var(--rw-on-accent, #fff); transform: scale(1.06); }

.rw-dp__spin { position: absolute; z-index: 2; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none;
	border: 4px solid rgba(255,255,255,.25); border-top-color: var(--dp-a); animation: rw-dp-rot .8s linear infinite; }
@keyframes rw-dp-rot { to { transform: rotate(360deg); } }

.rw-dp__flash { position: absolute; z-index: 3; top: 50%; translate: 0 -50%; min-width: 84px; padding: 14px 12px; border-radius: 999px; text-align: center; font-weight: 700; font-size: 1.05rem; pointer-events: none; background: rgba(0,0,0,.55); opacity: 0; }
.rw-dp__flash--back { left: 9%; }
.rw-dp__flash--fwd { right: 9%; }
.rw-dp__flash.is-on { animation: rw-dp-flash .65s ease-out forwards; }
@keyframes rw-dp-flash { 0% { opacity: 0; transform: scale(.85); } 20% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08); } }

.rw-dp__ui { position: absolute; inset-inline: 0; bottom: 0; z-index: 4; padding: 28px 10px 6px; transition: opacity .2s, transform .2s;
	background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.45) 55%, transparent); }
.rw-dp__row { display: flex; align-items: center; gap: 2px; }
.rw-dp__row button, .rw-dp__menu button { font: inherit; }
.rw-dp__row > button, .rw-dp__vol > button { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; }
.rw-dp__row > button:hover, .rw-dp__vol > button:hover { background: rgba(255,255,255,.16); }
.rw-dp__row button:focus-visible, .rw-dp__menu button:focus-visible { outline: 2px solid var(--dp-a); outline-offset: 1px; }
.rw-dp__row svg { width: 24px; height: 24px; }
.rw-dp__time { font-size: .82rem; font-variant-numeric: tabular-nums; padding: 0 8px; opacity: .95; white-space: nowrap; flex: 0 1 auto; min-width: 0; overflow: hidden; }
.rw-dp__grow { flex: 1; }
.rw-dp__row > .rw-dp__rate { font-size: .85rem; font-weight: 700; padding: 0 10px; }

.rw-dp__vol { display: flex; align-items: center; }
.rw-dp__vol input[type="range"] { width: 0; opacity: 0; transition: width .2s, opacity .2s; accent-color: var(--dp-a); height: 18px; margin: 0; }
.rw-dp__vol:hover input[type="range"], .rw-dp__vol:focus-within input[type="range"] { width: 78px; opacity: 1; margin-inline: 4px 8px; }

/* شريط التقدّم */
.rw-dp__seek { position: relative; height: 22px; display: flex; align-items: center; }
.rw-dp__track { position: absolute; inset-inline: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; pointer-events: none; transition: height .12s, margin-top .12s;
	background: linear-gradient(to right, var(--dp-a) var(--p, 0%), rgba(255,255,255,.55) var(--p, 0%) var(--b, 0%), rgba(255,255,255,.25) var(--b, 0%)); }
.rw-dp__seek:hover .rw-dp__track, .rw-dp__seek:focus-within .rw-dp__track { height: 6px; margin-top: -3px; }
.rw-dp__seek input[type="range"] { position: relative; width: 100%; height: 22px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: none; }
.rw-dp__seek input[type="range"]::-webkit-slider-runnable-track { background: transparent; height: 22px; }
.rw-dp__seek input[type="range"]::-moz-range-track { background: transparent; height: 22px; }
.rw-dp__seek input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; background: var(--dp-a); border: 2px solid #fff; transform: scale(0); transition: transform .12s; }
.rw-dp__seek input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--dp-a); border: 2px solid #fff; transform: scale(0); transition: transform .12s; }
.rw-dp__seek:hover input[type="range"]::-webkit-slider-thumb, .rw-dp__seek input[type="range"]:focus-visible::-webkit-slider-thumb, .rw-dp__seek input[type="range"]:active::-webkit-slider-thumb { transform: scale(1); }
.rw-dp__seek:hover input[type="range"]::-moz-range-thumb, .rw-dp__seek input[type="range"]:focus-visible::-moz-range-thumb, .rw-dp__seek input[type="range"]:active::-moz-range-thumb { transform: scale(1); }

/* قائمة السرعة */
.rw-dp__menu { position: absolute; inset-inline-end: 10px; bottom: 100%; margin-bottom: 4px; width: min(220px, calc(100% - 20px)); max-height: min(320px, 70%); overflow-y: auto; padding: 6px; border-radius: 14px; direction: rtl;
	background: rgba(18,26,35,.96); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 10px 30px rgba(0,0,0,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-align: start; }
.rw-dp__menu button { display: flex; align-items: center; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; text-align: start; }
.rw-dp__menu button:hover { background: rgba(255,255,255,.12); }
.rw-dp__menu [aria-checked="true"] { color: var(--dp-a); font-weight: 700; }
.rw-dp__menu-head { font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.14) !important; border-radius: 10px 10px 0 0 !important; margin-bottom: 4px; }

/* ملء الشاشة: الغلاف هو الذي يملأ الشاشة (يلغي قواعد النسبة والارتفاع الأقصى المخصصة للصفحة العادية) */
.rw-embed.rw-dp:fullscreen { width: 100% !important; height: 100% !important; max-height: none !important; aspect-ratio: auto !important; border-radius: 0 !important; }
.rw-embed.rw-dp:-webkit-full-screen { width: 100% !important; height: 100% !important; max-height: none !important; aspect-ratio: auto !important; border-radius: 0 !important; }

/* اللمس: أهداف أكبر، ولا شريط صوت (الصوت من أزرار الجهاز) */
@media (pointer: coarse) {
	.rw-dp__vol { display: none; }
	.rw-dp__row > button { min-width: 38px; height: 44px; padding: 0 3px; flex-shrink: 0; }
	.rw-dp__seek, .rw-dp__seek input[type="range"], .rw-dp__seek input[type="range"]::-webkit-slider-runnable-track { height: 28px; }
	.rw-dp__seek input[type="range"]::-moz-range-track { height: 28px; }
	.rw-dp__seek input[type="range"]::-webkit-slider-thumb { transform: scale(1); margin-top: 7px; }
	.rw-dp__seek input[type="range"]::-moz-range-thumb { transform: scale(1); }
}
@media (max-width: 420px) { .rw-dp__time { padding: 0 4px; font-size: .75rem; } .rw-dp__row > .rw-dp__rate { padding: 0 6px; } .rw-dp__center { width: 56px; height: 56px; } .rw-dp__center svg { width: 28px; height: 28px; } }
@media (prefers-reduced-motion: reduce) { .rw-dp__ui, .rw-dp__track, .rw-dp__center { transition: none; } .rw-dp__flash.is-on { animation-duration: .01s; } .rw-dp__spin { animation-duration: 2s; } }
