/* Eqtisad Gold Prices — RTL Arabic UI */

.egp-card{
    direction:rtl;
    background:#fff;
    border:1px solid #ece6d6;
    border-radius:14px;
    padding:18px 20px;
    margin:18px 0;
    box-shadow:0 1px 2px rgba(0,0,0,.04);
    font-family:"Cairo","Tajawal","Noto Sans Arabic",-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}
.egp-card-head{margin-bottom:12px;border-bottom:1px solid #f1ebd9;padding-bottom:10px;}
.egp-title{margin:0 0 6px;font-size:1.25rem;font-weight:700;color:#222;}
.egp-meta{color:#666;font-size:.92rem;}
.egp-table{width:100%;border-collapse:collapse;}
.egp-table th,.egp-table td{
    padding:11px 12px;
    text-align:right;
    border-bottom:1px solid #f3eedd;
    font-size:1rem;
}
.egp-table thead th{background:#fbf7ea;color:#3a2d00;font-weight:700;}
.egp-table tbody tr:hover{background:#fffaec;}
.egp-buy{color:#1d7a1d;font-weight:700;}
.egp-sell{color:#a65b00;font-weight:700;}
.egp-cur{color:#888;font-weight:500;font-size:.9em;margin-inline-start:4px;}
.egp-note{font-size:.85rem;color:#888;margin-top:10px;}

/* Chart */
.egp-chart-wrap{position:relative;height:340px;}
.egp-chart-canvas{width:100%!important;height:100%!important;}

/* Grid of countries */
.egp-grid{
    direction:rtl;
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
    gap:12px;
    margin:16px 0;
    font-family:"Cairo","Tajawal","Noto Sans Arabic",-apple-system,sans-serif;
}
.egp-grid-card{
    display:block;
    text-decoration:none;
    background:#fff;
    border:1px solid #ece6d6;
    border-radius:12px;
    padding:14px 16px;
    color:#222;
    transition:transform .15s ease, box-shadow .15s ease;
}
.egp-grid-card:hover{
    transform:translateY(-2px);
    box-shadow:0 4px 14px rgba(0,0,0,.06);
    border-color:#d8c987;
}
.egp-grid-name{font-weight:700;font-size:1.05rem;margin-bottom:4px;}
.egp-grid-price{color:#1d7a1d;font-size:1rem;}
.egp-grid-date{color:#888;font-size:.8rem;margin-top:2px;}

/* ---- Tools (calculators, units, zakat) ---- */
.egp-tool .egp-form{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:12px;
    margin:8px 0 14px;
}
.egp-tool .egp-form label{
    display:flex;
    flex-direction:column;
    font-size:.95rem;
    color:#444;
    gap:6px;
}
.egp-tool input[type="number"], .egp-tool select{
    padding:8px 10px;
    border:1px solid #d8c987;
    border-radius:8px;
    background:#fffdf7;
    font:inherit;
    direction:rtl;
}
.egp-tool input[type="number"]:focus, .egp-tool select:focus{
    outline:none;
    border-color:#b18a14;
    box-shadow:0 0 0 3px rgba(177,138,20,.15);
}
.egp-result{
    background:#fbf7ea;
    border:1px solid #f1e9c8;
    border-radius:10px;
    padding:12px 14px;
    margin-top:6px;
}
.egp-row{display:flex;justify-content:space-between;padding:5px 0;border-bottom:1px dashed #ece6d6;}
.egp-row:last-child{border-bottom:none;}
.egp-row.egp-total{font-size:1.1rem;color:#1d7a1d;border-top:2px solid #d8c987;border-bottom:none;margin-top:6px;padding-top:10px;}
.egp-row.egp-sub{color:#a65b00;}

/* ---- Compare table ---- */
.egp-compare tr.egp-cheapest{background:#e6f8e6;}
.egp-badge{
    display:inline-block;
    background:#1d7a1d;color:#fff;border-radius:8px;padding:1px 8px;
    font-size:.75rem;margin-inline-start:6px;
}

/* ---- FAQ ---- */
.egp-faq details{
    border:1px solid #ece6d6;
    border-radius:10px;
    padding:10px 14px;
    margin:8px 0;
    background:#fffdf7;
}
.egp-faq details[open]{background:#fffaec;}
.egp-faq summary{
    font-weight:700;
    color:#3a2d00;
    cursor:pointer;
    list-style:none;
}
.egp-faq summary::-webkit-details-marker{display:none;}
.egp-faq summary::before{content:'▸ ';color:#b18a14;}
.egp-faq details[open] summary::before{content:'▾ ';}
.egp-faq p{margin:8px 0 0;color:#444;line-height:1.7;}

/* ---- Ticker ---- */
.egp-ticker{
    direction:rtl;
    font-family:"Cairo","Tajawal","Noto Sans Arabic",sans-serif;
    background:linear-gradient(180deg,#fffaec 0%,#fdf3d2 100%);
    border:1px solid #d8c987;
    border-radius:12px;
    padding:14px 16px;
    margin:12px 0;
    display:grid;
    grid-template-columns:1fr auto;
    gap:4px 12px;
    align-items:center;
}
.egp-ticker.up   .egp-tick-delta{color:#1d7a1d;}
.egp-ticker.down .egp-tick-delta{color:#c0392b;}
.egp-ticker.flat .egp-tick-delta{color:#888;}
.egp-tick-name{font-size:.9rem;color:#666;}
.egp-tick-price{font-size:1.55rem;font-weight:800;color:#3a2d00;}
.egp-tick-price small{font-size:.8rem;font-weight:500;color:#888;margin-inline-start:6px;}
.egp-tick-delta{font-size:.95rem;font-weight:700;}
.egp-tick-date{font-size:.8rem;color:#888;grid-column:1/-1;text-align:start;}

@media (max-width:520px){
    .egp-table th,.egp-table td{padding:9px 8px;font-size:.95rem;}
    .egp-title{font-size:1.1rem;}
    .egp-chart-wrap{height:260px;}
    .egp-tick-price{font-size:1.3rem;}
}
