/* Broker header (broker panel + public broker pages) and the public broker page. 2026-10-15
   Loaded after style_rtl.css / brk.css, so the rules here win. */

/* header: grey bamsara logo + skyline like /broker, broker logo and name in front */
#header { background: #ffffff url(/images/header.png) repeat-x 370px 0 !important; background-size: auto 105px !important; height: 100px; }
#logo { background: url(/broker/images/logo.png) no-repeat left center !important; background-size: 200px auto !important;
        width: 200px !important; height: 80px !important; float: left; margin: 6px 0 0 0 !important; opacity: .8; }
.transbox { background-color: rgba(234, 88, 0, .78) !important; border-radius: 4px; position: relative; display: inline-block;
            padding: 10px 18px !important; margin: 14px 0 0 12px !important; vertical-align: top; width: auto !important; max-width: 520px; }
.transbox.tb-logo { background: #fff !important; padding: 4px 8px !important; border: 1px solid #e3e8ee; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.transbox.tb-logo img { display: block; max-height: 56px; max-width: 160px; }
#mto, #mtologo { width: auto !important; max-width: 480px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
                 color: #fff; font-size: 19px; font-weight: bold; line-height: 32px; padding: 0 !important; }
#mto a, #mtologo a { color: #fff !important; text-decoration: none; }

/* public broker page */
.cp { color: #333; line-height: 1.9; font-size: 13px; padding: 0 6px 40px; }
.cp a { color: #005881; }
.cp h2 { font-size: 17px; color: #005881; margin: 26px 0 12px; border-bottom: 1px solid #e3e8ee; padding-bottom: 6px; }
.cp-hero { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; background: #f7f9fb; border: 1px solid #e3e8ee;
           border-radius: 8px; padding: 18px 20px; }
.cp-logo { width: 140px; height: 110px; display: flex; align-items: center; justify-content: center; background: #fff;
           border: 1px solid #e3e8ee; border-radius: 6px; overflow: hidden; flex: 0 0 auto; }
.cp-logo img { max-width: 130px; max-height: 100px; }
.cp-logo span { font-size: 40px; color: #005881; font-weight: bold; }
.cp-main { flex: 1 1 320px; min-width: 0; }
.cp-main h1 { font-size: 24px; margin: 0 0 4px; color: #222; }
.cp-meta { color: #777; font-size: 13px; margin-bottom: 8px; }
.cp-desc { margin: 6px 0 12px; }
.cp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.cp-btn { display: inline-block; padding: 9px 18px; border-radius: 5px; border: 1px solid #005881; color: #005881 !important;
          text-decoration: none; font-size: 14px; background: #fff; cursor: pointer; font-family: inherit; }
.cp-btn:hover { background: #eef5fa; }
.cp-btn.cp-primary { background: #ea5800; border-color: #ea5800; color: #fff !important; font-weight: bold; }
.cp-btn.cp-primary:hover { background: #c94b00; }
.cp-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.cp-fact { flex: 1 1 200px; background: #fff; border: 1px solid #e3e8ee; border-radius: 6px; padding: 8px 12px; }
.cp-fact b { display: block; color: #777; font-weight: normal; font-size: 12px; }

.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.sp-card { display: block; border: 1px solid #e3e8ee; border-radius: 6px; overflow: hidden; text-decoration: none; color: #333 !important; background: #fff; }
.sp-card:hover { border-color: #005881; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.sp-img { height: 140px; background: #f1f5f9 center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #889; font-size: 13px; }
.sp-body { padding: 8px 10px; font-size: 13px; line-height: 1.8; }
.sp-body b { color: #005881; }
.sp-muted { color: #888; font-size: 12px; }
.cp-more { margin: 14px 0 0; }

.cp-contact { background: #fff8f3; border: 1px solid #f3d3bd; border-radius: 8px; padding: 16px 20px; }
.cp-contact .cp-grid { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.cp-contact label { flex: 1 1 200px; display: flex; flex-direction: column; font-size: 12px; color: #555; }
.cp-contact label.cp-wide { flex-basis: 100%; }
.cp-contact input, .cp-contact select, .cp-contact textarea { margin-top: 3px; padding: 7px 8px; border: 1px solid #ccd5df; border-radius: 4px;
          font-family: inherit; font-size: 13px; box-sizing: border-box; width: 100%; background: #fff; }
.cp-captcha { display: flex; align-items: center; gap: 8px; }
.cp-captcha img { border: 1px solid #ccd5df; border-radius: 4px; }
.cp-contact #sendMsg { width: auto !important; margin-top: 12px; padding: 10px 28px !important; font-size: 15px !important; }
.cp-contact #reportResult { margin-top: 10px; }
#right.cp { margin-top: 112px; }

/* pencil to change name / logo in the header of /broker/ */
.transbox .hdr-edit { position: absolute; top: -8px; left: -8px; width: 22px; height: 22px; line-height: 22px; text-align: center;
    border-radius: 50%; background: #fff; color: #ea5800 !important; border: 1px solid #ea5800; font-size: 13px; text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: pointer; }
.transbox .hdr-edit:hover { background: #ea5800; color: #fff !important; }
.transbox.hdr-busy { opacity: .5; }

/* calendar toolbar: keep the arrow glyphs unmirrored in RTL */
#calendar .fc-toolbar .fc-button { direction: ltr; }
#calendar .fc-toolbar h2 { font-size: 18px; }

/* "داشبورد من" / "صفحه آژانس من" for a logged-in broker in the empty menu of the broker headers */
#bghin #nav li.nav-broker { display: inline-block; float: none; vertical-align: top; margin: 22px 0 0 8px; }
#bghin #nav li.nav-broker a { display: inline-block; padding: 7px 12px !important; margin: 0 !important; height: auto !important; line-height: 20px;
    border-radius: 4px; background: #005881 !important; color: #fff !important; font-size: 13px; text-decoration: none; }
#bghin #nav li.nav-broker.current_page_item a { background: #3d87aa; }

/* broker home: search box; the agency name in the header is the <h1> there */
h1#mto { margin: 0; font-size: 19px; line-height: 32px; font-weight: bold; color: #fff; }
.cp-search { background: #fff; border: 1px solid #e3e8ee; border-radius: 8px; padding: 6px 20px 16px; margin-top: 14px; }
.cp-search h2 { margin-top: 10px; }
.cp-search-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.cp-search label { flex: 1 1 160px; display: flex; flex-direction: column; font-size: 12px; color: #555; }
.cp-search select { margin-top: 3px; padding: 7px 8px; border: 1px solid #ccd5df; border-radius: 4px; font-family: inherit; font-size: 13px; background: #fff; }
.cp-search .cp-btn { padding: 9px 26px; }

/* large lettering (headings, agency name, key figures): Arial / Helvetica */
#mto, h1#mto, #mtologo, .cp h2, .cp-main h1, .sp-head h1, .cp-btn.cp-primary, .cp-search .cp-btn,
.bp .bp-title, .bp h4, .bp .bp-sub, .bp .bp-card-value, .bp .bp-monthnav b,
#calendar .fc-toolbar h2, #bghin #nav li.nav-broker a {
    font-family: Arial, Helvetica, sans-serif !important;
}

/* ---- phones (2026-10-16): broker header, public broker pages ---------------------------------
   style_rtl.css (desktop, fixed widths) is also loaded for 320-480 px, so the widths are reset here. */
@media (max-width: 768px) {
    #bghin, #header { height: 64px !important; }
    #header { background-size: auto 64px !important; background-position: 140px 0 !important; }
    #logo { display: none !important; }   /* bamsara lettering is in the skyline anyway; the room is for the broker */
    /* the bamsara "منو" button has nothing to show on a broker site: name and logo always visible instead */
    #menu { display: none !important; }
    #navcont { display: block !important; position: static !important; width: auto !important; height: auto !important;
               background: none !important; border: 0 !important; box-shadow: none !important; margin: 0 !important; padding: 0 !important; }
    #navcont .arrm { display: none !important; }
    #nav { display: flex !important; flex-wrap: nowrap; align-items: center; gap: 6px; position: static !important; width: auto !important;
           height: 64px !important; margin: 0 !important; padding: 0 8px !important; background: none !important; overflow: hidden; }
    .transbox { margin: 0 !important; padding: 5px 9px !important; max-width: 70vw; flex: 0 1 auto; min-width: 0; }
    .transbox.tb-logo { padding: 2px 4px !important; flex: 0 0 auto; }
    .transbox.tb-logo img { max-height: 40px; max-width: 72px; }
    #mto, h1#mto, #mtologo { font-size: 15px !important; line-height: 24px !important; max-width: 100%; }
    .transbox .hdr-edit { top: -6px; left: -6px; width: 20px; height: 20px; line-height: 20px; font-size: 12px; }
    /* login of the mobile header (header-comp.php puts it into #nav): only a small "ورود" at the end */
    #nav #firstlg { order: 9; flex: 0 0 auto; margin: 0 !important; float: none !important; width: auto !important; }
    #nav #firstlg #avatar, #nav #firstlg #nmvsi { display: none !important; }
    #nav #firstlg #vrud { margin: 0 !important; padding: 4px 8px !important; font-size: 12px; }
    #bghin #nav li.nav-broker { margin: 0 !important; flex: 0 0 auto; width: auto !important; float: none !important; }
    #bghin #nav li.nav-broker.current_page_item { display: none !important; }   /* the page we are on: room for the name */
    #bghin #nav li.nav-broker a { padding: 5px 7px !important; font-size: 11px; white-space: nowrap; }

    /* page frame */
    #ppp, #page { width: 100% !important; max-width: 100% !important; min-width: 0 !important; margin: 0 !important; box-sizing: border-box;
                  border-left: 0 !important; border-right: 0 !important; float: none !important; display: block !important; }
    #left:empty { display: none !important; }

    /* public broker pages */
    #right.cp, .cp { width: auto !important; max-width: 100% !important; float: none !important; margin-left: 0 !important; margin-right: 0 !important;
                     padding: 0 10px 30px !important; box-sizing: border-box; }
    #right.cp { margin-top: 74px !important; }
    .cp-hero { padding: 12px; gap: 12px; }
    .cp-main h1 { font-size: 20px; }
    .cp-actions .cp-btn { flex: 1 1 auto; text-align: center; padding: 9px 10px; }
    .cp-search { padding: 4px 12px 12px; }
    .cp-search label { flex: 1 1 120px; }
    .cp-search .cp-btn { width: 100%; }
    .cp-contact { padding: 12px; }
    .cp-contact label { flex: 1 1 100%; }
    .cp-captcha { flex-wrap: wrap; }
    .cp-contact #sendMsg { width: 100% !important; }
    .sp-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .sp-img { height: 110px; }
    .sp-head h1 { font-size: 18px; }
    /* ad page: lettering of the picture placeholder has a fixed width */
    .im_al_b, .im_sm_b, .im_sm_mp { width: auto !important; max-width: calc(100% - 30px); box-sizing: border-box; }
}
