/* request 57: the original Indo Mail design. Applies only when html[data-design="indo"] (switched on in Settings). */
.r57-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--border, #E3E6EC); border-radius: 10px; }
.r57-row .r57-hint { color: var(--text-2, #5F6368); font-size: 13px; }

html[data-design="indo"] {
  --brand: #B3261E; --brand-deep: #7A1712; --brand-pale: #FFF6E0; --gold: #D4A017; --star: #D4A017;
  --bg: #F3F5F9; --surface: #FFFFFF; --surface-2: #EEF1F6; --hover: #F6ECE9; --selected: #FDF0D0; --border: #DFE4EC;
  --r57-navy: #A3221B; --r57-navy-2: #861B15; --r57-saffron: #E0AE1E; --r57-saffron-ink: #2B1D00;
}
html[data-design="indo"][data-theme="dark"] {
  --brand: #E0AE1E; --brand-pale: #2B2410; --bg: #0E1322; --surface: #151C2F; --surface-2: #1C2440; --hover: #1F2843; --selected: #33290F; --border: #27304A; --text: #EEF1F7; --text-2: #A9B2C6;
}
@media (prefers-color-scheme: dark) { html[data-design="indo"]:not([data-theme="light"]) {
  --brand: #E0AE1E; --brand-pale: #2B2410; --bg: #0E1322; --surface: #151C2F; --surface-2: #1C2440; --hover: #1F2843; --selected: #33290F; --border: #27304A; --text: #EEF1F7; --text-2: #A9B2C6; } }

/* request 62/63: red and gold colours, larger text and rows (63: larger again). top bar: red, with "New message" on the right */
html[data-design="indo"] .topbar { background: var(--r57-navy); color: #fff; }
html[data-design="indo"] .topbar .icon-btn, html[data-design="indo"] .topbar a { color: #fff; }
html[data-design="indo"] .topbar .search { background: var(--r57-navy-2); border-radius: 10px; }
html[data-design="indo"] .topbar .search input { color: #fff; }
html[data-design="indo"] .topbar .search input::placeholder { color: #F3D6D2; }
html[data-design="indo"] .fab.r57-new { position: static; height: 44px; padding: 0 20px; font-size: 16px; margin: 0 6px; border-radius: 10px; box-shadow: none;
  background: var(--r57-saffron); color: var(--r57-saffron-ink); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; transform: none; }
html[data-design="indo"] .fab.r57-new:hover { filter: brightness(1.05); }

/* navy sidebar with full folder names (wider than the first slim rail, which cut names off) */
@media (min-width: 768px) {
  html[data-design="indo"] .sidebar { width: 290px; padding: 10px 0 16px; background: var(--r57-navy-2); }
  html[data-design="indo"] .sidebar .nav-item { flex-direction: row; justify-content: flex-start; gap: 14px; width: auto; height: 52px; margin: 3px 12px; padding: 0 18px; border-radius: 12px; color: #FBE9E7; font-size: 16.5px; text-align: left; position: relative; }
  html[data-design="indo"] .sidebar .nav-item .nl { max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html[data-design="indo"] .sidebar .nav-item .count { position: static; margin: 0 0 0 auto; font-size: 13px; background: var(--r57-saffron); color: var(--r57-saffron-ink); border-radius: 9px; padding: 0 7px; }
  html[data-design="indo"] .sidebar .nav-item:hover { background: #9E2A22; }
  html[data-design="indo"] .sidebar .nav-item.active { background: var(--r57-saffron); color: var(--r57-saffron-ink); font-weight: 700; }
  html[data-design="indo"] .sidebar .nav-group { border: 0; }
  html[data-design="indo"] .sidebar h3, html[data-design="indo"] .sidebar .nav-head { color: #F1C3BC; }
}

/* list: hexagon initials and the saffron Pin marker */
html[data-design="indo"] .avatar, html[data-design="indo"] .r57-hex { border-radius: 0; clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); }
html[data-design="indo"] .avatar-btn .avatar { clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); }
html[data-design="indo"] .row .row-avatar { display: grid; width: 42px; height: 42px; font-size: 15px; margin-right: 10px; }
html[data-design="indo"] .row { height: 66px; font-size: 16.5px; border-bottom-color: var(--border); }
html[data-design="indo"] .row.unread { box-shadow: inset 3px 0 0 var(--r57-saffron); }
html[data-design="indo"] .row:hover { box-shadow: inset 3px 0 0 var(--r57-navy); }
html[data-design="indo"] .row .star { color: #B7BFCC; transform: rotate(-30deg); }
html[data-design="indo"] .row .star.on { color: var(--r57-saffron); }

/* action groups instead of category tabs */
html[data-design="indo"] .cat-tabs { display: none; }
html[data-design="indo"] #r57-groups { display: flex; gap: 8px; padding: 10px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--border); background: var(--surface); }
html[data-design="indo"] .r57-chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 18px; padding: 5px 12px; font: 600 15px/1.3 var(--font, system-ui); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
html[data-design="indo"] .r57-chip:hover { background: var(--hover); }
html[data-design="indo"] .r57-chip.on { background: var(--r57-navy); border-color: var(--r57-navy); color: #fff; }
html[data-design="indo"] .r57-chip .r57-n:not(:empty) { background: var(--r57-saffron); color: var(--r57-saffron-ink); border-radius: 9px; padding: 0 6px; font-size: 11px; }
html[data-design="indo"] .r57-grouped > .row, html[data-design="indo"] .r57-grouped > .list-section, html[data-design="indo"] .r57-grouped > .empty { display: none; }
html[data-design="indo"] #r57-list .r57-item { display: flex; align-items: center; gap: 14px; height: 66px; font-size: 16.5px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; background: var(--surface); }
html[data-design="indo"] #r57-list .r57-item:hover { box-shadow: inset 3px 0 0 var(--r57-navy); background: var(--hover); }
html[data-design="indo"] #r57-list .r57-item.unread { font-weight: 700; box-shadow: inset 3px 0 0 var(--r57-saffron); }
html[data-design="indo"] .r57-hex { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; flex: none; }
html[data-design="indo"] #r57-list .r57-who { width: 180px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-design="indo"] #r57-list .r57-subj { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-design="indo"] #r57-list .r57-snip { color: var(--text-2); font-weight: 400; }
html[data-design="indo"] #r57-list .r57-date { width: 70px; text-align: right; font-size: 12px; color: var(--text-2); flex: none; }
html[data-design="indo"] .r57-empty { padding: 28px 16px; color: var(--text-2); text-align: center; }

/* reading view: encryption status and quick replies */
html[data-design="indo"] .banner.e2ee { background: #E6F3EC; color: #1E5B3A; border: 1px solid #BFE0CC; border-radius: 10px; }
html[data-design="indo"] #r57-quick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
html[data-design="indo"] #r57-quick .r57-ql { font-weight: 700; color: var(--text-2); font-size: 13px; }

/* phone: bottom bar, no floating button */
html[data-design="indo"] #r57-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(4, 1fr); height: 58px;
  background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
html[data-design="indo"] #r57-bottom .r57-bb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--text-2); font: 600 11px/1.2 var(--font, system-ui); text-decoration: none; cursor: pointer; }
html[data-design="indo"] #r57-bottom .r57-bi { font-size: 18px; line-height: 1; }
html[data-design="indo"] #r57-bottom .r57-bb:first-child { color: var(--r57-navy); }
@media (max-width: 767px) {
  html[data-design="indo"] .fab { display: none !important; }
  html[data-design="indo"] body { padding-bottom: 58px; }
  html[data-design="indo"] #r57-list .r57-who { width: 110px; }
  html[data-design="indo"] #im-lang-sw { bottom: 70px; }
}

/* request 63: larger text across the new design */
html[data-design="indo"] body { font-size: 16px; }
html[data-design="indo"] .topbar { min-height: 64px; }
html[data-design="indo"] .topbar .search { height: 46px; font-size: 16px; }
html[data-design="indo"] .topbar .search input { font-size: 16px; }
html[data-design="indo"] .sidebar .material-symbols-outlined, html[data-design="indo"] .sidebar .ic { font-size: 24px; }

/* request 64: fixes from the first look at the red and gold design */
/* folder icons were dark grey on red, so they could not be seen */
html[data-design="indo"] .sidebar .nav-item.g svg.gi, html[data-design="indo"] .sidebar .nav-item svg { color: #FBE9E7; width: 22px; height: 22px; flex: none; }
html[data-design="indo"] .sidebar .nav-item.g.active svg.gi, html[data-design="indo"] .sidebar .nav-item.active svg { color: var(--r57-saffron-ink); }
html[data-design="indo"] .sidebar .nav-item.g .nl { color: inherit; }
/* the Indo Mail logo on the red bar sits on a white tile so it stays visible */
html[data-design="indo"] .topbar .logo img { background: #fff; border-radius: 10px; padding: 3px; box-sizing: border-box; }
html[data-design="indo"] .topbar .logo { color: #fff; }
/* rows that show attachments grow to fit them instead of spilling into the next row */
html[data-design="indo"] .row.has-files { height: auto; min-height: 66px; padding-top: 8px; padding-bottom: 10px; }
/* one compose button: "New message" in the top bar replaces the Compose button in the side panel */
@media (min-width: 768px) { html[data-design="indo"] .sidebar .compose-btn { display: none; } }

/* request 66: the reminders above the inbox ("Received 3 days ago. Reply?") no longer get cut off when a mail is open on the right;
   the reminder text moves to a second line when the list is narrow. Applies to both designs. */
.nudge { flex-wrap: wrap; min-width: 0; row-gap: 2px; }
.nudge b { flex: 0 1 auto; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nudge .ns { flex: 1 1 140px; min-width: 0; }
.nudge .nt { flex: 0 0 auto; margin-left: auto; }
html[data-design="indo"] .nudge { font-size: 15px; }
