/*
 * Bahia Cloud Mail - UI v1
 * Extiende Roundcube Elastic.
 * Inspiracion: distribucion de Webmail SiteGround.
 */

:root {
  --bc-accent: #4743ed;
  --bc-accent-soft: #ececff;
  --bc-text: #202437;
  --bc-muted: #697187;
  --bc-border: #e7e9f0;
  --bc-surface: #ffffff;
  --bc-sidebar: #fafbfe;
}

/* Base */
body {
  color: var(--bc-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
}

#layout {
  background: var(--bc-surface);
}

#layout-menu,
#layout-sidebar,
#layout-list,
#layout-content {
  box-sizing: border-box;
}

#layout-menu {
  background: var(--bc-sidebar);
  border-right: 1px solid var(--bc-border);
}

#layout-sidebar {
  background: #fff;
  border-right: 1px solid var(--bc-border);
}

#layout-list {
  background: #fff;
  border-right: 1px solid var(--bc-border);
}

#layout-content {
  background: #fff;
}

/* Navegacion */
#taskmenu a,
#taskmenu .button {
  border-radius: 9px;
  transition: background-color .18s ease,
              color .18s ease;
}

#taskmenu a:hover,
#taskmenu .button:hover {
  background: var(--bc-accent-soft);
}

#taskmenu .selected,
#taskmenu .active {
  background: var(--bc-accent-soft) !important;
  color: var(--bc-accent) !important;
}

/* Herramientas y encabezados */
#layout-list .header,
#layout-content .header,
#layout-sidebar .header {
  background: #fafbfe;
  border-bottom: 1px solid var(--bc-border);
}

.toolbar,
.menu,
.popupmenu {
  border-color: var(--bc-border);
}

a.button,
button,
input,
select,
textarea {
  transition: border-color .18s ease,
              box-shadow .18s ease;
}

/* Listado de carpetas */
#mailboxlist li,
#mailboxlist a {
  border-radius: 7px;
}

#mailboxlist .selected,
#mailboxlist .active {
  background: var(--bc-accent-soft);
}

/* Listado de mensajes */
#messagelist tr,
#messagelist .message,
.listing li {
  border-color: #eff0f4;
}

#messagelist .selected,
.listing .selected {
  background: #eff0ff;
}

#messagelist .unread {
  font-weight: 650;
}

/* Formularios */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  border-radius: 8px;
}

input:focus,
textarea:focus,
select:focus {
  outline-color: var(--bc-accent);
}

/* Botones primarios */
button.mainaction,
.button.mainaction,
input.mainaction,
.btn-primary {
  background: var(--bc-accent) !important;
  border-color: var(--bc-accent) !important;
  border-radius: 9px !important;
  color: #fff !important;
}

/* Escritorio: cuatro areas como la referencia */
@media screen and (min-width: 1201px) {

  body.task-mail #layout-menu {
    flex: 0 0 232px;
    width: 232px;
    min-width: 232px;
    padding: 16px 12px;
  }

  body.task-mail #layout-menu::before {
    content: "BAHÍA CLOUD  /  MAIL";
    display: block;
    padding: 13px 10px 24px;
    color: #27264e;
    font-size: 15px;
    font-weight: 750;
    letter-spacing: .025em;
  }

  body.task-mail #taskmenu a.button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    margin: 3px 0;
    text-align: left;
  }

  body.task-mail #taskmenu .button .inner {
    display: inline !important;
    visibility: visible !important;
    width: auto;
    height: auto;
    font-size: 15px;
  }

  body.task-mail #layout-sidebar {
    flex: 0 0 230px;
    width: 230px;
    min-width: 210px;
  }

  body.task-mail #layout-list {
    flex: 0 0 350px;
    width: 350px;
    min-width: 310px;
  }

  body.task-mail #layout-content {
    flex: 1 1 auto;
    min-width: 250px;
  }
}

/* Intermedios y movil: respetar Elastic */
@media screen and (max-width: 1200px) {
  #layout-menu::before {
    display: none !important;
  }
}

@media screen and (max-width: 767px) {
  #layout-menu,
  #layout-sidebar,
  #layout-list,
  #layout-content {
    border-right: 0;
  }

  #taskmenu a,
  #taskmenu .button {
    border-radius: 6px;
  }
}

/* Login */
body.task-login #login-form,
body.task-login .box-inner {
  border-radius: 16px;
}

body.task-login input[type="submit"] {
  background: var(--bc-accent);
  border-radius: 9px;
}
