/* ISTT Persian UI v3.2. Base direction is supplied by the RTL Elastic build. */
@font-face{font-family:"Arad FD";src:url("fonts/AradFD-Regular.woff2") format("woff2");font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:"Arad FD";src:url("fonts/AradFD-Bold.woff2") format("woff2");font-style:normal;font-weight:700;font-display:swap}
#taskmenu a.about{display:none!important}
html[lang^="fa"]{--istt-accent:#087e98;--istt-hover:rgba(8,126,152,.08);--istt-selected:rgba(8,126,152,.14);--istt-line:#e2e9ed;--istt-selection-bg:#dceef7;--istt-selection-text:#163f55}
html[lang^="fa"].dark-mode{--istt-accent:#4bd5ed;--istt-hover:rgba(75,213,237,.07);--istt-selected:rgba(75,213,237,.13);--istt-line:#33434c}
html[lang^="fa"] body{direction:rtl;font-family:"Arad FD",Tahoma,sans-serif}
html[lang^="fa"] input,html[lang^="fa"] select,html[lang^="fa"] textarea,
html[lang^="fa"] button,html[lang^="fa"] .btn,html[lang^="fa"] .form-control,
html[lang^="fa"] .ui-widget{font-family:"Arad FD",Tahoma,sans-serif!important}
/* Never change pseudo-element icon fonts. */
html[lang^="fa"] #layout-menu{border-inline-end:1px solid var(--istt-line)}
html[lang^="fa"] #taskmenu a{transition:background-color .15s,color .15s}
html[lang^="fa"] #taskmenu a .inner{font-size:.82rem;line-height:1.6}
html[lang^="fa"] #taskmenu .special-buttons{inset-inline-start:0;inset-inline-end:auto}
html[lang^="fa"] #taskmenu a.selected{box-shadow:none;border:0}
/* Main right-hand navigation: inset tiles, icon above its caption. */
@media screen and (min-width:481px){
  html[lang^="fa"] #layout-menu{display:flex;flex-direction:column;width:88px;flex-shrink:0;overflow:hidden}
  html[lang^="fa"] #layout-menu>.popover-header{flex-shrink:0}
  html[lang^="fa"] #taskmenu{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}
  html[lang^="fa"] #taskmenu>.action-buttons,html[lang^="fa"] #taskmenu>a{flex-shrink:0}
  html[lang^="fa"] #taskmenu .special-buttons{position:static;width:100%;margin-top:auto;flex-shrink:0}
  html[lang^="fa"] #taskmenu a{
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:6px;width:calc(100% - 12px);height:auto;min-height:66px;
    margin:4px 6px;padding:9px 2px;border:0!important;border-radius:11px;
    text-align:center;box-shadow:none!important;
  }
  html[lang^="fa"] #taskmenu a:before{
    float:none!important;display:block;width:auto;height:auto;
    margin:0!important;line-height:1.1;font-size:1.3rem;
  }
  html[lang^="fa"] #taskmenu a .inner{
    display:block!important;padding:0;white-space:normal;overflow-wrap:anywhere;
    font-size:.78rem;line-height:1.5;
  }
  html[lang^="fa"] #taskmenu a:hover{background:rgba(255,255,255,.06)}
  html[lang^="fa"] #taskmenu a.selected{
    background:var(--istt-selection-bg);color:var(--istt-selection-text);
  }
  html[lang^="fa"] #taskmenu>.action-buttons{margin-block:5px 9px}
  html[lang^="fa"] #taskmenu .action-buttons a.compose{
    min-height:82px;gap:6px;background:transparent!important;color:#d9e9ed!important;
    box-shadow:none!important;
  }
  html[lang^="fa"] #taskmenu .action-buttons a.compose .inner{font-weight:700}
  html[lang^="fa"] #taskmenu .action-buttons a.compose:before{
    content:"\f303";display:flex;align-items:center;justify-content:center;
    width:40px!important;height:40px!important;border-radius:12px;font-size:1.2rem;line-height:1;
    background:rgba(75,213,237,.12);color:#77d8e5;
  }
  html[lang^="fa"] #taskmenu .action-buttons a.compose:hover:before{background:rgba(75,213,237,.23);color:#b5f3fa}
  html[lang^="fa"] #taskmenu .action-buttons a.compose.selected:before{background:#b5e9ef;color:#123e46}
}
html[lang^="fa"] #folderlist-content{padding:0}
html[lang^="fa"] .folderlist li>a{display:block;position:relative;box-sizing:border-box;width:calc(100% - 12px);border-radius:10px;margin:6px;transition:background-color .15s}
html[lang^="fa"] .folderlist li>a:hover{background-color:var(--istt-hover)}
html[lang^="fa"] .folderlist li.selected{background:transparent!important}
html[lang^="fa"] .folderlist li.selected>a{background-color:var(--istt-selection-bg)!important;color:var(--istt-selection-text)!important;font-weight:700}
html[lang^="fa"] .folderlist li.mailbox .unreadcount{
  top:50%;transform:translateY(-50%);inset-inline-end:8px;inset-inline-start:auto;margin:0!important;
  border-radius:6px;background:var(--istt-accent);color:#fff;
}
html[lang^="fa"].dark-mode .folderlist li.mailbox .unreadcount{color:#12242c}
html[lang^="fa"] #layout-sidebar>.header .username{direction:ltr;unicode-bidi:isolate;font-family:Tahoma,sans-serif;font-size:.82rem}
html[lang^="fa"] .toolbar a{border-radius:7px}
html[lang^="fa"] .toolbar a:not(.disabled):hover{background-color:var(--istt-hover)}
html[lang^="fa"] .messagelist tr.selected td{background-color:var(--istt-selected)!important}
/* Date occupies the left column across both text lines, centered vertically. */
html[lang^="fa"] #messagelist>tbody>tr{display:flex;width:100%;align-items:stretch}
html[lang^="fa"] #messagelist>tbody>tr>td{border-inline:0!important}
html[lang^="fa"] #messagelist.focus>tbody>tr.focused>td.subject{outline:1px solid var(--istt-accent);outline-offset:-2px}
html[lang^="fa"] #messagelist td.threads{order:-2;flex-shrink:0}
html[lang^="fa"] #messagelist td.flags{
  order:-1;flex:0 0 24px;width:24px;padding-inline:0;
  display:flex;align-items:center;justify-content:center;border-inline:0;
}
html[lang^="fa"] .messagelist td.subject{
  display:grid;grid-template-columns:minmax(0,1fr) auto auto;
  grid-template-rows:minmax(20px,auto) minmax(24px,auto);
  column-gap:.65rem;row-gap:3px;align-content:center;
  flex:1;min-width:0;width:auto;min-height:76px;padding:12px 12px 12px 10px!important;
}
html[lang^="fa"] .messagelist td.subject>span.fromto{
  grid-column:1;grid-row:1;min-width:0;padding-inline:0;text-align:right;
  font-size:.86rem;line-height:20px;
}
html[lang^="fa"] .messagelist td.subject>span.size{grid-column:2;grid-row:1;white-space:nowrap}
html[lang^="fa"] .messagelist td.subject>span.date{
  grid-column:3;grid-row:1/3;align-self:center;justify-self:end;
  font-size:.82rem;line-height:1.6;opacity:.95;text-align:left;white-space:nowrap;
}
html[lang^="fa"] .messagelist td.subject>span.subject{
  grid-column:1/3;grid-row:2;min-width:0;font-size:1rem;line-height:24px;
}
html[lang^="fa"] .messagelist td.subject span.msgicon.status:before{height:24px;line-height:24px}
html[lang^="fa"] .messagelist td.flags{vertical-align:middle}
html[lang^="fa"] .messagelist td.subject .subject a,html[lang^="fa"] .messagelist td.subject .fromto{unicode-bidi:plaintext}
html[lang^="fa"] .menu.listing a{text-align:start}
html[lang^="fa"] .popover,html[lang^="fa"] .ui-dialog{direction:rtl;border-radius:10px;box-shadow:0 12px 36px rgba(0,0,0,.2)}
html[lang^="fa"] .popover .listing li a{border-radius:5px}
html[lang^="fa"] .popover .menu li a[aria-haspopup]:after{transform:scaleX(-1)}
html[lang^="fa"] .ui-dialog .ui-dialog-title{float:right;text-align:right}
html[lang^="fa"] .ui-dialog .ui-dialog-titlebar-close{right:auto;left:.3em}
html[lang^="fa"] .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:left}
html[lang^="fa"] .ui-datepicker{direction:rtl}
html[lang^="fa"] .form-control{border-radius:7px}
html[lang^="fa"] a:focus-visible,html[lang^="fa"] button:focus-visible,html[lang^="fa"] input:focus-visible,
html[lang^="fa"] select:focus-visible,html[lang^="fa"] textarea:focus-visible{outline:2px solid var(--istt-accent);outline-offset:2px}
/* Mirror directional glyphs only, never text or logos. */
html[lang^="fa"] .pagenav a:before,html[lang^="fa"] a.reply:before,html[lang^="fa"] a.reply-all:before,
html[lang^="fa"] a.forward:before,html[lang^="fa"] .back-list-button:before,
html[lang^="fa"] .back-sidebar-button:before,html[lang^="fa"] .back-content-button:before,
html[lang^="fa"] .treelist .treetoggle:not(.expanded):before{transform:scaleX(-1)}
html[lang^="fa"] .menu.pagenav a:before{display:inline-block}
html[lang^="fa"] input[type="email"],html[lang^="fa"] input[type="password"],html[lang^="fa"] #rcmloginuser,
html[lang^="fa"] .recipient-input,html[lang^="fa"] .email,html[lang^="fa"] .emailfield{direction:ltr;text-align:left;unicode-bidi:isolate}
html[lang^="fa"] #messagebody{direction:ltr;text-align:initial}
html[lang^="fa"] .task-mail.action-preview #layout-content>.frame-content,
html[lang^="fa"] .task-mail.action-show #layout-content>.frame-content{padding:24px clamp(16px,2.5vw,28px)}
html[lang^="fa"] #message-header>.subject{line-height:1.6;overflow-wrap:anywhere}
html[lang^="fa"] #messagebody .message-part,html[lang^="fa"] #messagebody .pre{unicode-bidi:plaintext}
html[lang^="fa"] pre,html[lang^="fa"] code,html[lang^="fa"] kbd,html[lang^="fa"] samp{font-family:monospace}
/* A slate-blue dark palette with distinct, quiet surfaces. */
html[lang^="fa"].dark-mode{
  --istt-accent:#8bc7f2;--istt-hover:rgba(139,199,242,.08);
  --istt-selected:rgba(139,199,242,.15);--istt-line:#293b50;
  --istt-selection-bg:#223d57;--istt-selection-text:#b9dfff;
  color-scheme:dark;
}
html[lang^="fa"].dark-mode body{background:#111c2a;color:#d8e4ef}
html[lang^="fa"].dark-mode #layout-menu{background:#0e1825}
html[lang^="fa"].dark-mode #layout-menu>.popover-header,
html[lang^="fa"].dark-mode #taskmenu .special-buttons{background:#0e1825!important}
html[lang^="fa"].dark-mode #layout-sidebar{background:#152334}
html[lang^="fa"].dark-mode #layout-list{background:#172638}
html[lang^="fa"].dark-mode #layout-content{background:#111c2a}
html[lang^="fa"].dark-mode #layout>div>.header,
html[lang^="fa"].dark-mode #layout>div>.footer{
  background:#162436;border-color:var(--istt-line);color:#b9cbe0;
}
html[lang^="fa"].dark-mode #taskmenu a{color:#b9ccdf}
html[lang^="fa"].dark-mode #taskmenu .special-buttons a:not(:focus){background:transparent}
html[lang^="fa"].dark-mode #taskmenu a:hover{background:#1b2c40}
html[lang^="fa"].dark-mode #taskmenu a.selected{background:var(--istt-selection-bg);color:var(--istt-selection-text)}
html[lang^="fa"].dark-mode #taskmenu .action-buttons a.compose:before{
  background:#203a52;color:#a5d4f6;
}
html[lang^="fa"].dark-mode #taskmenu .action-buttons a.compose:hover:before{background:#2a4c69;color:#d5edff}
html[lang^="fa"].dark-mode #taskmenu .action-buttons a.compose.selected:before{background:#a9d2ef;color:#142f44}
html[lang^="fa"].dark-mode .searchbar{background:#152538;border-color:var(--istt-line)}
html[lang^="fa"].dark-mode .searchbar input{color:#d8e4ef}
html[lang^="fa"].dark-mode .searchbar input::placeholder{color:#93a8c0;opacity:1}
html[lang^="fa"].dark-mode #messagelist td{border-bottom-color:var(--istt-line)}
html[lang^="fa"].dark-mode #messagelist tr:not(.flagged):not(.deleted) td.subject>span.fromto{color:#aec1d7}
html[lang^="fa"].dark-mode #messagelist tr:not(.flagged):not(.deleted) td.subject>span.date,
html[lang^="fa"].dark-mode #messagelist tr:not(.flagged):not(.deleted) td.subject>span.size{color:#a1b4cd}
html[lang^="fa"].dark-mode #messagelist tr:not(.flagged):not(.deleted) td.subject>span.subject a{color:#dce7f4}
html[lang^="fa"].dark-mode #messagelist tr:hover td{background:#1d3249!important}
html[lang^="fa"].dark-mode #messagelist tr.selected td{background:#233f5a!important}
html[lang^="fa"].dark-mode #messagelist tr.selected:hover td{background:#294a68!important}
html[lang^="fa"].dark-mode #messagelist tr.selected:not(.flagged):not(.deleted) td.subject>span.subject a{color:#c7e7ff}
html[lang^="fa"].dark-mode .popover,
html[lang^="fa"].dark-mode .ui-dialog{background:#1a2b3f;color:#d8e4ef;border-color:#334a63}
html[lang^="fa"].dark-mode .popover .popover-header,
html[lang^="fa"].dark-mode .ui-dialog .ui-dialog-titlebar{background:#20344b;color:#d8e4ef;border-color:#334a63}
html[lang^="fa"].dark-mode .form-control,
html[lang^="fa"].dark-mode .custom-select{background-color:#112033;border-color:#334b64;color:#d8e4ef}
html[lang^="fa"].dark-mode .form-control:disabled{background-color:#1b2a3c;color:#9eb0c6}
@media(prefers-reduced-motion:reduce){html[lang^="fa"] #taskmenu a,html[lang^="fa"] .folderlist li>a{transition:none}}
