/* ============================================================
   وصلني - ستايل شامل لكل صفحات المشروع
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

* { box-sizing: border-box; }

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
    background: #f7f5f0;
    margin: 0;
    padding: 0;
    direction: rtl;
    color: #222;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 16px 60px;
}

.back-link {
    display: inline-block;
    color: #124037;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 16px;
    transition: opacity 0.2s ease;
}

.back-link:hover { opacity: 0.7; }

h1 {
    color: #124037;
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    margin: 10px 0 20px;
}

/* ============ الصفحة الرئيسية (Hero) ============ */
.hero-box {
    text-align: center;
    padding: 30px 10px;
}

.hero-title {
    color: #124037;
    font-size: clamp(30px, 8vw, 42px);
    font-weight: 900;
    margin: 10px 0 4px;
}

.hero-sub {
    color: #6b6b6b;
    font-size: 16px;
    margin-bottom: 10px;
}

@keyframes driveCar {
    0%   { transform: translateX(-40px); }
    50%  { transform: translateX(40px); }
    100% { transform: translateX(-40px); }
}

/* ============ صندوق الفورمز (تسجيل رحلة / فلترة) ============ */
.wsalni-driver-form {
    background: transparent;
}

.disclaimer {
    background: #fff8e6;
    border: 1px solid #d4b665;
    color: #8a6d1a;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.6;
}

.filter-box {
    background: #fff;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 4px 14px rgba(18, 64, 55, 0.08);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.filter-box .input-group,
.post-form .input-group {
    flex: 1 1 100%;
}

.input-group {
    margin-bottom: 14px;
}

.input-group label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #124037;
    margin-bottom: 6px;
}

.input-group select,
.input-group input[type="text"],
.input-group input[type="tel"],
.input-group input[type="number"],
.input-group input[type="date"],
.input-group textarea {
    width: 100%;
    height: 50px;
    border: 1.5px solid #e7e2d6;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 16px;
    font-family: inherit;
    color: #222;
    background: #f7f5f0;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.input-group textarea {
    height: auto;
    padding: 12px 14px;
    resize: vertical;
}

.input-group select:focus,
.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #b8963f;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(184, 150, 63, 0.15);
}

.time-picker {
    display: flex;
    gap: 8px;
}

.time-picker select {
    height: 50px;
    border: 1.5px solid #e7e2d6;
    border-radius: 12px;
    font-size: 15px;
    background: #f7f5f0;
    flex: 1;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.time-picker select:focus {
    outline: none;
    border-color: #b8963f;
    background: #fff;
}

.post-form button[type="submit"],
.filter-box button[type="submit"] {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 999px;
    background: #124037;
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, transform 0.15s ease;
}

.post-form button[type="submit"]:hover,
.filter-box button[type="submit"]:hover {
    background: #b8963f;
}

.post-form button[type="submit"]:active,
.filter-box button[type="submit"]:active {
    transform: scale(0.98);
}

/* ============ رسائل النجاح / الخطأ ============ */
.success-msg {
    background: #e8f5e9;
    color: #1b5e20;
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.7;
}

.success-msg a {
    color: #124037;
    text-decoration: underline;
}

.error-msg {
    background: #fdecea;
    color: #c0392b;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 700;
    margin-bottom: 18px;
    text-align: center;
}

/* ============ كروت الرحلات ============ */
.rides-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ride-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 4px 14px rgba(18, 64, 55, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    transition: box-shadow 0.2s ease;
}

.ride-card:hover {
    box-shadow: 0 6px 20px rgba(18, 64, 55, 0.12);
}

.driver-info h3 {
    margin: 0 0 8px;
    color: #124037;
    font-size: 18px;
    font-weight: 800;
}

.route-info {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
    color: #444;
}

.time-big { font-weight: 700; color: #124037; }
.seats-big { font-weight: 700; color: #444; }

.price-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 130px;
}

.price-box {
    background: #f7f5f0;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 800;
    color: #124037;
    font-size: 16px;
    text-align: center;
}

.call-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #124037;
    color: #fff;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    direction: ltr;
    transition: background 0.2s ease;
}

.call-btn:hover { background: #b8963f; }

.rate-now-btn {
    display: inline-block;
    background: #b8963f;
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    margin-top: 10px;
    transition: background 0.2s ease;
}

.rate-now-btn:hover { background: #124037; }

.no-results-card {
    background: #fff;
    border-radius: 18px;
    padding: 40px 20px;
    text-align: center;
    color: #888;
    box-shadow: 0 4px 14px rgba(18, 64, 55, 0.06);
}

.no-results-card svg {
    color: #b8963f;
    margin-bottom: 12px;
}

.no-results-card h3 {
    color: #124037;
    margin: 0 0 6px;
}

/* ============ تصميم الأزرار الرئيسية في الصفحة الأولى ============ */
.buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 100%;
    margin-top: 20px;
}

.btn-luxury {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 350px;
    height: 70px;
    border-radius: 16px;
    text-decoration: none;
    box-sizing: border-box;
    padding: 5px 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-luxury-text {
    font-size: clamp(20px, 5.5vw, 24px);
    font-weight: 800;
    line-height: 1.2;
    font-family: 'Tajawal', sans-serif;
}

.btn-green {
    background-color: #124037;
    color: #b8963f;
    border-color: #b8963f;
    box-shadow: 0 4px 15px rgba(18, 64, 55, 0.15);
}
.btn-green:hover {
    background-color: #b8963f;
    color: #ffffff;
    border-color: #b8963f;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(184, 150, 63, 0.3);
}

.btn-gold {
    background-color: #ffffff;
    color: #124037;
    border-color: #124037;
    box-shadow: 0 4px 15px rgba(18, 64, 55, 0.08);
}
.btn-gold:hover {
    background-color: #124037;
    color: #b8963f;
    border-color: #124037;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(18, 64, 55, 0.2);
}

.btn-dark {
    background-color: #1a1a1a;
    color: #b8963f;
    border-color: #b8963f;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}
.btn-dark:hover {
    background-color: #b8963f;
    color: #ffffff;
    border-color: #b8963f;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(184, 150, 63, 0.3);
}

.btn-luxury svg {
    stroke: currentColor;
    transition: all 0.3s ease;
}

/* ============ صفحة رحلاتي (تعديل/إلغاء) ============ */
.edit-toggle {
    background: none;
    border: none;
    color: #124037;
    font-weight: 700;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    margin-top: 8px;
    font-family: inherit;
}

.edit-panel {
    display: none;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #d4b665;
    width: 100%;
}

.edit-panel.open { display: block; }

.ride-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-cancel-ride {
    flex: 1;
    background: #a33;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    transition: background 0.2s ease;
}
.btn-cancel-ride:hover { background: #8a2828; }

.btn-save-ride {
    flex: 1;
    background: #124037;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    transition: background 0.2s ease;
}
.btn-save-ride:hover { background: #0d312a; }

/* ============ شريط الحساب العلوي (تسجيل دخول/خروج) ============ */
.account-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    padding: 10px 2px 18px;
    font-size: 14px;
}
.account-bar .welcome { color: #124037; font-weight: 700; }
.account-bar a { text-decoration: none; font-weight: 700; }
.account-bar .login-link { color: #124037; }
.account-bar .logout-link { color: #a33; }

.form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.greeting {
    font-weight: 700;
    color: #124037;
    margin: 0 0 16px;
}

/* ============ بطاقة المسار: "من" و"إلى" بخط منقط بينهما
   (تستخدم داخل .filter-box أو .post-form بدل حقلين منفصلين) ============ */
.route-box {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.route-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 24px;
    width: 14px;
    flex-shrink: 0;
}
.route-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid #124037;
    background: #fff;
    flex-shrink: 0;
}
.route-dot.end {
    border-color: #b8963f;
    background: #b8963f;
}
.route-dash {
    flex: 1;
    width: 0;
    border-right: 2px dotted #d8d2c2;
    margin: 4px 0;
}

.route-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}
.route-fields .input-group { margin-bottom: 0; }

/* ============ صف الموافقة (checkbox) ============ */
.agree-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    font-weight: 400;
    color: #555;
    margin-bottom: 16px;
    line-height: 1.6;
}
.agree-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #124037;
    margin-top: 2px;
}

/* ============ الوصولية والحركة ============ */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #124037;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}