@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { 
    background-color: #f4f6f9; 
    color: #1e293b; 
    line-height: 1.5;
}

.header { 
    background-color: #ffd600; 
    color: #002D72; 
    padding: 22px 20px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
}

.logo { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 12px; 
}

.logo h2 { 
    font-weight: 800; 
    font-size: 24px; 
    letter-spacing: -0.5px; 
}

.container { 
    max-width: 500px; 
    margin: 40px auto; 
    padding: 0 20px; 
}

/* --- تصميم كارد البحث الفخم --- */
.tracking-wrapper { 
    background: #ffffff; 
    padding: 35px 25px; 
    border-radius: 24px; 
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04); 
    margin-bottom: 35px; 
    border: 1px solid #f1f5f9;
}

.page-title { 
    color: #002D72; 
    font-size: 24px; 
    text-align: center; 
    margin-bottom: 10px; 
    font-weight: 800; 
    letter-spacing: -0.5px; 
}

.page-subtitle { 
    color: #64748b; 
    font-size: 14px; 
    text-align: center; 
    margin-bottom: 30px; 
}

.search-form { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    align-items: center; 
}

.input-group { 
    position: relative; 
    background: #f8fafc; 
    border: 2px solid #e2e8f0;
    border-radius: 16px; 
    display: flex; 
    align-items: center; 
    width: 100%; 
    transition: all 0.3s ease;
}

.input-group:focus-within { 
    border-color: #002D72; 
    background: #ffffff; 
    box-shadow: 0 4px 15px rgba(0, 45, 114, 0.05);
}

.input-icon { 
    position: absolute; 
    left: 18px; 
    color: #94a3b8; 
    width: 22px; 
}

input[type="text"] { 
    width: 100%; 
    padding: 18px 15px 18px 50px; 
    border: none; 
    font-size: 16px; 
    font-weight: 600; 
    border-radius: 16px; 
    outline: none; 
    background: transparent; 
    color: #0f172a; 
}

input[type="text"]::placeholder { 
    color: #94a3b8; 
    font-weight: 500; 
}

.search-btn { 
    background: #002D72; 
    color: #fff; 
    border-radius: 14px; 
    padding: 18px 45px; 
    font-weight: 700; 
    font-size: 16px; 
    width: fit-content; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 8px;
    border: none; 
    cursor: pointer; 
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(0, 45, 114, 0.15);
}

.search-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 10px 25px rgba(0, 45, 114, 0.25); 
}

@keyframes spin { 100% { transform: rotate(360deg); } }
.spin-anim { animation: spin 1s linear infinite; }

/* --- منطقة النتائج --- */
.result-area { animation: fadeIn 0.5s ease-in-out; }

.result-label { 
    text-align: center; 
    margin-bottom: 25px; 
    color: #64748b; 
    font-size: 15px; 
    font-weight: 500; 
}

.track-code { 
    color: #002D72; 
    font-weight: 800; 
    font-size: 16px; 
    background: #ffffff; 
    padding: 6px 14px; 
    border-radius: 10px; 
    margin-left: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
}

.status-card { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    margin-bottom: 25px; 
    background: #ffffff; 
    padding: 24px; 
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.status-icon { 
    color: #002D72; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    
    width: 55px; 
    height: 55px; 
    border-radius: 16px;
}

.status-text { display: flex; flex-direction: column; gap: 4px; }
.status-small { font-size: 12px; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.status-large { font-size: 18px; color: #002D72; font-weight: 800; }

/* --- كارد معلومات الشحنة والصورة --- */
.shipment-info-wrapper {
    display: flex;
    flex-direction: row; 
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #ffffff;
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.shipment-info-card {
    flex: 1;
}

.card-title { 
    font-size: 18px; 
    color: #002D72; 
    margin-bottom: 20px; 
    font-weight: 800; 
    letter-spacing: -0.5px; 
    text-align: left;
}

.info-item { 
    display: flex; 
    align-items: center; 
    gap: 16px; 
    padding: 16px 0; 
    border-bottom: 1px solid #f1f5f9; 
    text-align: left;
}

.info-item:last-child { border-bottom: none; }

/* مسحنا الخلفية الملونة والـ padding عشان تصير الأيقونات سادة */
.icon-box { 
    color: #002D72; 
    display: flex; 
    align-items: center; 
}

.info-text { display: flex; flex-direction: column; gap: 4px; }
.info-label { font-size: 12px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.info-value { font-size: 15px; font-weight: 700; color: #0f172a; }

.shipment-side-image {
    width: 150px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    background: transparent;
}

/* --- الأزرار والخريطة --- */
.btn-container { text-align: center; margin-top: 15px; margin-bottom: 35px; }
.confirm-link { text-decoration: none; }

.confirm-btn {
    background: #ffd600; 
    color: #002D72; 
    font-weight: 800; 
    font-size: 16px;
    width: fit-content; 
    border-radius: 16px; 
    padding: 20px 45px;
    display: inline-flex; 
    justify-content: center; 
    align-items: center;
    border: none; 
    cursor: pointer; 
    transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(255, 214, 0, 0.3);
}

.confirm-btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 14px 30px rgba(255, 214, 0, 0.4); 
}

.confirm-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

#map { 
    height: 300px; 
    width: 100%; 
    border-radius: 24px; 
    z-index: 1; 
    margin-bottom: 40px; 
    box-shadow: 0 12px 40px rgba(0,0,0,0.06); 
    border: 4px solid #ffffff; 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* --- تخصيص الجوال --- */
@media (max-width: 480px) {
    .shipment-info-wrapper {
        flex-direction: row !important; 
        padding: 15px 12px;
        gap: 10px;
    }
    .shipment-side-image {
        width: 140px !important; 
        margin-top: 0;
    }
    .info-item {
        padding: 10px 0;
        gap: 10px;
    }
    .info-label { font-size: 10px; }
    .info-value { font-size: 12px; }
    .card-title { font-size: 15px; margin-bottom: 12px; }
}

/* --- تخصيص الكمبيوتر --- */
@media (min-width: 768px) {
    .container { 
        max-width: 950px; 
        padding: 0 30px; 
    }
    
    #resultArea {
        max-width: 900px !important;
        width: 100%;
        margin: 0 auto;
    }

    .tracking-wrapper {
        padding: 50px;
        max-width: 750px;
        margin: 0 auto 40px auto;
    }
    
    .search-form {
        flex-direction: row;
        gap: 20px;
        width: 100%;
    }
    
    .input-group { flex: 1; }
    .search-btn { height: 60px; padding: 0 45px; margin-top: 0; }
    
    .shipment-side-image {
        width: 190px !important;
    }
}