:root { --rd-primary: #0288d1; --rd-secondary: #e91e63; --rd-bg: #ffffff; --rd-text: #333333; --rd-border: #dee2e6; }
.rd-container { max-width: 500px; margin: 20px auto; background: var(--rd-bg); color: var(--rd-text); direction: rtl; font-family: 'Segoe UI', sans-serif; position: relative; display: flex; flex-direction: column; height: 750px; border: 1px solid var(--rd-border); box-sizing: border-box; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); overflow: hidden; }
.rd-welcome { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; border-bottom: 1px solid #eee; background: #fff; height: 55px; box-sizing: border-box; flex-shrink: 0; position: relative; }
.rd-back-btn-wrapper { color: #0288d1; cursor: pointer; font-weight: bold; font-size: 14px; align-items: center; gap: 5px; min-width: 60px; z-index: 5; display: none; }
.rd-welcome h3 { margin: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; text-align: center; position: absolute; left: 50%; transform: translateX(-50%); width: 100%; pointer-events: none; color: #333; }
.rd-user-info { text-align: left; min-width: 100px; max-width: 150px; flex-shrink: 0; line-height: 1.2; z-index: 5; }
.rd-user-info .name { color: var(--rd-primary); font-weight: bold; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* تنسيق الخطوات الجمالي v8.9 */
.rd-stepper { display: flex; justify-content: space-between; padding: 10px 5%; border-bottom: 1px solid #eee; background: #fff; flex-shrink: 0; border-bottom-left-radius: 15px !important; border-bottom-right-radius: 15px !important; position: relative; z-index: 30; box-shadow: 0 2px 10px rgba(0,0,0,0.02); transition: background 0.3s; }
.rd-stepper:hover { background: #fafafa; }
.rd-step { flex: 1; text-align: center; font-size: 11px; color: #999; position: relative; }
.rd-step.active { color: var(--rd-primary); font-weight: bold; }
.rd-step-icon { width: 32px; height: 32px; background: #f8f9fa; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 4px; font-size: 14px; border: 1px solid #eee; transition: all 0.3s; color: #999; }
.rd-step.active .rd-step-icon { background: var(--rd-primary); color: #fff; border-color: var(--rd-primary); box-shadow: 0 4px 10px rgba(2, 136, 209, 0.2); }

.rd-form-body { flex: 1; display: flex; flex-direction: column; position: relative; overflow: hidden; height: 100%; }
.rd-step-content { display: none; flex-direction: column; height: 100%; overflow: hidden; }
.rd-step-content.active { display: flex; }
.map-wrapper { flex: 1; position: relative; width: 100%; background: #f0f0f0; min-height: 250px; }
.map-container { height: 100%; width: 100%; }
.center-marker { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 5; font-size: 50px; pointer-events: none; color: #ff0000; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }

.rd-map-controls-left { position: absolute; bottom: -14px; left: -13px; z-index: 100; }
.rd-map-controls-right { position: absolute; bottom: 20px; right: 15px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.rd-map-btn { width: 40px; height: 40px; background: #fff; color: #333; border: 1px solid #ddd; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: all 0.2s; }
.rd-map-btn:hover { background: #f5f5f5; border-color: #ccc; transform: translateY(-1px); }
.rd-btn-gps-float { width: 45px; height: 45px; border-radius: 50%; background: #fff; color: var(--rd-primary); border: 1px solid #eee; box-shadow: 0 4px 15px rgba(0,0,0,0.15); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: transform 0.2s; }

/* فوتر الخريطة بحدود دائرية v8.9 */
.controls-area { background: #fff; padding: 15px; border-top: 1px solid #eee; z-index: 20; flex-shrink: 0; border-top-left-radius: 15px !important; border-top-right-radius: 15px !important; box-shadow: 0 -2px 10px rgba(0,0,0,0.02); transition: background 0.3s; position: relative; }
.controls-area:hover { background: #fafafa; }

.rd-field { margin-bottom: 12px; }
.rd-field label { display: block !important; font-weight: bold; margin-bottom: 8px; font-size: 14px; color: var(--rd-primary); text-align: right; direction: rtl; }
.input-wrapper { position: relative; display: flex; align-items: center; gap: 8px; }
.rd-field input, .rd-field textarea { width: 100%; padding: 12px; border: 1px solid var(--rd-border); border-radius: 8px; box-sizing: border-box; font-size: 14px; background: #fcfcfc; color: var(--rd-text); }
#rd_dropoff_city, #rd_pickup_city { border-radius: 12px !important; }

/* دمج حقل الجوال الاحترافي v8.9 */
.rd-phone-wrapper { display: flex; align-items: center; border: 1px solid var(--rd-border); border-radius: 8px; background: #fcfcfc; overflow: hidden; height: 50px; direction: ltr; transition: border-color 0.3s; }
.rd-phone-wrapper:focus-within { border-color: var(--rd-primary); }
.rd-phone-prefix { display: flex; align-items: center; gap: 5px; padding: 0 12px; background: #f8f9fa; border-right: 1px solid var(--rd-border); height: 100%; position: relative; cursor: pointer; }
.rd-phone-prefix i { color: var(--rd-primary); font-size: 16px; }
.rd-phone-prefix select { border: none; background: transparent; font-size: 14px; font-weight: bold; cursor: pointer; outline: none; padding: 0 18px 0 0; color: #333; -webkit-appearance: none; z-index: 2; }
.rd-phone-prefix::after { content: '\f107'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 10px; color: #999; pointer-events: none; }
.rd-phone-wrapper input { border: none !important; flex: 1; height: 100%; padding: 0 15px !important; background: transparent !important; font-size: 16px; letter-spacing: 1px; color: #333; outline: none !important; text-align: left; }

.rd-clear-btn { background: none; border: none; color: #0288d1; font-weight: bold; cursor: pointer; font-size: 12px; padding: 5px; white-space: nowrap; }
.rd-btn-next { width: 100%; height: 50px; background: var(--rd-primary); color: #fff; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; margin-top: 5px; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: opacity 0.3s; }
.rd-btn-next:disabled { opacity: 0.6; cursor: not-allowed; }
.rd-error-msg { background: #fff3f3; color: #d32f2f; padding: 10px; border-radius: 8px; border: 1px solid #ffcdd2; margin-top: -10px; margin-bottom: 10px; display: none; text-align: center; font-weight: bold; font-size: 13px; position: relative; z-index: 25; }
.rd-loading-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.7); display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 100; border-radius: 8px; }
.rd-spinner { width: 40px; height: 40px; border: 4px solid #f3f3f3; border-top: 4px solid var(--rd-primary); border-radius: 50%; animation: rd-spin 1s linear infinite; margin-bottom: 10px; }
.rd-loading-text { font-weight: bold; color: var(--rd-primary); font-size: 16px; }
@keyframes rd-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.rd-summary { background: #f8f9fa; padding: 15px; border-radius: 12px; margin-bottom: 15px; border: 1px solid #eee; }
.rd-summary-item { display: flex; justify-content: space-between; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #eee; font-size: 14px; }

/* رسالة الواتساب الاحترافية v8.9 */
.rd-whatsapp-msg { background: #e8f5e9; color: #2e7d32; padding: 15px; border-radius: 10px; border: 1px solid #c8e6c9; text-align: center; font-weight: bold; margin-top: 20px; font-size: 14px; line-height: 1.6; }

.pac-container { z-index: 999999 !important; border-top: none; box-shadow: 0 4px 12px rgba(0,0,0,0.15); border-radius: 0 0 10px 10px; margin-top: 2px; }
.pac-item { padding: 8px 12px; cursor: pointer; font-family: inherit; font-size: 13px; line-height: 1.5; border-top: 1px solid #f0f0f0; }

@media (max-width: 768px) {
    .rd-container { position: fixed; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; z-index: 99999 !important; border: none; margin: 0 !important; border-radius: 0 !important; }
    .rd-form-body { flex: 1; height: calc(100% - 110px); }
    .map-wrapper { flex: 1; min-height: 0; }
    .controls-area { padding: 15px; background: #fff; box-shadow: 0 -5px 15px rgba(0,0,0,0.05); }
    .pac-container { bottom: 180px !important; top: auto !important; width: 100% !important; left: 0 !important; position: fixed !important; border-radius: 10px 10px 0 0; }
    .rd-back-btn-wrapper { display: flex !important; }
}
