/*
Theme Name: منصة التوصيل
Theme URI: https://example.com
Author: Custom Build
Description: ثيم مخصص لمنصة توصيل الطعام - يعرض المطاعم والماركتات كـ "تذاكر طلب"، ويوفر صفحات تسجيل للزبائن والسائقين والمطاعم، ويتكامل مباشرة مع إضافة Delivery Platform.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: dp-theme
Tags: e-commerce, food-delivery, rtl-language-support
*/

/* ==========================================================================
   Design Tokens
   المفهوم: بطاقة كل مطعم مصممة كـ "تذكرة طلب" (Order Ticket) — حواف مسننة
   وخط تقسيم متقطع، لأن التذكرة هي العنصر الأكثر تمثيلاً لعالم التوصيل.
   ========================================================================== */

:root {
	--dp-bg:        #F5F3EE;   /* ورقي فاتح دافئ - خلفية عامة */
	--dp-ink:       #17231F;   /* حبر داكن - نص أساسي */
	--dp-green:     #1F4B3F;   /* أخضر عميق - اللون الأساسي (نضارة/طعام) */
	--dp-green-2:   #2E6B58;   /* أخضر أفتح للتدرجات والحالات hover */
	--dp-amber:     #F2A93B;   /* أصفر مانجو - الأزرار والحث على الإجراء */
	--dp-red:       #E14F3D;   /* أحمر مرجاني - حالة حية / تنبيه */
	--dp-paper:     #FFFFFF;   /* أبيض التذكرة */
	--dp-line:      #D8D2C4;   /* خطوط فاصلة */
	--dp-radius:    14px;
	--dp-shadow:    0 6px 20px rgba(23, 35, 31, 0.10);

	--dp-font-display: 'Cairo', 'Tahoma', sans-serif;
	--dp-font-body:    'IBM Plex Sans Arabic', 'Tahoma', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	background: var(--dp-bg);
	color: var(--dp-ink);
	font-family: var(--dp-font-body);
	margin: 0;
	direction: rtl;
	line-height: 1.7;
}

h1, h2, h3, h4 {
	font-family: var(--dp-font-display);
	font-weight: 800;
	margin: 0 0 .5em;
	line-height: 1.25;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.dp-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.dp-header {
	background: var(--dp-green);
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 50;
	box-shadow: var(--dp-shadow);
}

.dp-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	max-width: 1100px;
	margin: 0 auto;
}

.dp-logo {
	font-family: var(--dp-font-display);
	font-weight: 800;
	font-size: 22px;
	color: #fff;
	display: flex;
	align-items: center;
	gap: 8px;
}

.dp-logo .dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--dp-amber);
	display: inline-block;
}

.dp-nav {
	display: flex;
	gap: 22px;
	font-size: 15px;
}

.dp-nav a {
	opacity: .9;
	transition: opacity .2s;
}
.dp-nav a:hover { opacity: 1; }

.dp-nav-user {
	opacity: .85;
	font-size: 14px;
}

.dp-nav-logout {
	background: rgba(255,255,255,.14);
	padding: 7px 16px;
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 700;
}
.dp-nav-logout:hover { background: rgba(255,255,255,.24); }

.dp-nav-toggle {
	display: none;
	background: none;
	border: 0;
	color: #fff;
	font-size: 26px;
	cursor: pointer;
}

@media (max-width: 760px) {
	.dp-nav { display: none; }
	.dp-nav.is-open {
		display: flex;
		flex-direction: column;
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		background: var(--dp-green);
		padding: 14px 20px 20px;
		gap: 14px;
	}
	.dp-nav-toggle { display: block; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.dp-hero {
	background: var(--dp-green);
	color: #fff;
	padding: 64px 0 90px;
	position: relative;
	overflow: hidden;
}

.dp-hero::after {
	content: "";
	position: absolute;
	inset: auto -10% -60% -10%;
	height: 220px;
	background: var(--dp-green-2);
	border-radius: 50%;
	opacity: .35;
}

.dp-hero-inner {
	max-width: 700px;
	position: relative;
	z-index: 1;
}

.dp-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255,255,255,.12);
	border: 1px solid rgba(255,255,255,.25);
	color: var(--dp-amber);
	font-size: 13px;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 18px;
}

.dp-eyebrow .pulse {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--dp-red);
	box-shadow: 0 0 0 0 rgba(225,79,61,.7);
	animation: dp-pulse 1.6s infinite;
}

@keyframes dp-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(225,79,61,.6); }
	70%  { box-shadow: 0 0 0 8px rgba(225,79,61,0); }
	100% { box-shadow: 0 0 0 0 rgba(225,79,61,0); }
}

.dp-hero h1 {
	font-size: clamp(32px, 5vw, 48px);
	margin-bottom: 16px;
}

.dp-hero p {
	font-size: 17px;
	opacity: .9;
	margin-bottom: 28px;
	max-width: 520px;
}

.dp-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.dp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 26px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 15px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform .15s ease, background .2s ease;
}
.dp-btn:hover { transform: translateY(-1px); }

.dp-btn-amber {
	background: var(--dp-amber);
	color: var(--dp-ink);
}
.dp-btn-amber:hover { background: #ffbb52; }

.dp-btn-outline {
	background: transparent;
	border-color: rgba(255,255,255,.5);
	color: #fff;
}
.dp-btn-outline:hover { border-color: #fff; }

.dp-btn-primary {
	background: var(--dp-green);
	color: #fff;
}
.dp-btn-primary:hover { background: var(--dp-green-2); }

.dp-btn-block { width: 100%; }

/* ==========================================================================
   قسم الخدمات (روابط الأدوار الثلاثة)
   ========================================================================== */

.dp-roles {
	margin-top: -50px;
	position: relative;
	z-index: 2;
}

.dp-roles-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

@media (max-width: 760px) {
	.dp-roles-grid { grid-template-columns: 1fr; }
}

.dp-role-card {
	background: var(--dp-paper);
	border-radius: var(--dp-radius);
	box-shadow: var(--dp-shadow);
	padding: 26px 22px;
	text-align: center;
}

.dp-role-card .emoji { font-size: 34px; margin-bottom: 10px; }
.dp-role-card h3 { font-size: 18px; margin-bottom: 6px; }
.dp-role-card p { font-size: 14px; color: #566; margin-bottom: 16px; }

/* ==========================================================================
   قسم المطاعم / الماركتات — بطاقة "تذكرة الطلب"
   ========================================================================== */

.dp-section {
	padding: 70px 0;
}

.dp-section-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 30px;
	gap: 12px;
	flex-wrap: wrap;
}

.dp-section-head .label {
	font-size: 13px;
	font-weight: 700;
	color: var(--dp-green);
	text-transform: uppercase;
	letter-spacing: .05em;
}

.dp-vendors-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 22px;
}

/* التذكرة نفسها: حواف مسننة أعلى وأسفل عبر gradient متكرر + خط متقطع بالمنتصف */
.dp-ticket {
	background: var(--dp-paper);
	border-radius: 6px;
	box-shadow: var(--dp-shadow);
	position: relative;
	overflow: hidden;
	transition: transform .2s ease;
}
.dp-ticket:hover { transform: translateY(-4px); }

.dp-ticket-notch-top,
.dp-ticket-notch-bottom {
	height: 14px;
	background:
		radial-gradient(circle at 10px 0, transparent 9px, var(--dp-paper) 10px) 0 0 / 20px 20px repeat-x,
		var(--dp-bg);
}
.dp-ticket-notch-bottom { transform: rotate(180deg); }

.dp-ticket-body { padding: 18px 18px 10px; }

.dp-ticket-vendor-name {
	font-family: var(--dp-font-display);
	font-weight: 800;
	font-size: 17px;
	margin-bottom: 4px;
}

.dp-ticket-vendor-phone {
	font-size: 12.5px;
	color: #6b7a72;
	margin-bottom: 12px;
}

.dp-ticket-divider {
	border: none;
	border-top: 1.5px dashed var(--dp-line);
	margin: 0 18px 12px;
}

.dp-ticket-cta {
	display: block;
	text-align: center;
	padding: 12px;
	background: var(--dp-green);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
}
.dp-ticket-cta:hover { background: var(--dp-green-2); }

.dp-empty-state {
	background: var(--dp-paper);
	border: 1.5px dashed var(--dp-line);
	border-radius: var(--dp-radius);
	padding: 40px 20px;
	text-align: center;
	color: #6b7a72;
}

/* ==========================================================================
   نماذج التسجيل / تسجيل الدخول
   ========================================================================== */

.dp-form-wrap {
	max-width: 460px;
	margin: 60px auto;
	background: var(--dp-paper);
	border-radius: var(--dp-radius);
	box-shadow: var(--dp-shadow);
	padding: 34px 28px;
}

.dp-form-wrap h1 {
	font-size: 24px;
	margin-bottom: 6px;
}
.dp-form-wrap .dp-form-sub {
	font-size: 14px;
	color: #6b7a72;
	margin-bottom: 26px;
}

.dp-field { margin-bottom: 16px; }

.dp-field label {
	display: block;
	font-size: 13.5px;
	font-weight: 700;
	margin-bottom: 6px;
}

.dp-field input {
	width: 100%;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1.5px solid var(--dp-line);
	font-size: 15px;
	font-family: var(--dp-font-body);
	background: var(--dp-bg);
}
.dp-field input:focus {
	outline: none;
	border-color: var(--dp-green);
	background: #fff;
}

.dp-form-msg {
	margin-top: 14px;
	font-size: 14px;
	padding: 10px 14px;
	border-radius: 10px;
	display: none;
}
.dp-form-msg.success { display: block; background: #E7F4EE; color: var(--dp-green); }
.dp-form-msg.error   { display: block; background: #FBEAE7; color: var(--dp-red); }

.dp-role-switch {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
	background: var(--dp-bg);
	padding: 4px;
	border-radius: 999px;
}
.dp-role-switch a {
	flex: 1;
	text-align: center;
	padding: 9px 0;
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 700;
	color: #6b7a72;
}
.dp-role-switch a.active {
	background: var(--dp-green);
	color: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.dp-footer {
	background: var(--dp-ink);
	color: rgba(255,255,255,.7);
	padding: 40px 0;
	margin-top: 40px;
	font-size: 14px;
	text-align: center;
}
.dp-footer strong { color: #fff; }

/* Accessibility */
a:focus-visible, button:focus-visible, input:focus-visible {
	outline: 2px solid var(--dp-amber);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
