/* MailMonkey — sign-in card, then Evelyn Stroud's inbox.
   Ported from the WordPress build (the login card and inbox styles were inline
   in the page); the Flatsome theme shell is gone, so these rules stand alone. */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Roboto", Arial, sans-serif;
  background: #f1f3f4;
  color: #202124;
}

/* ---------- Sign in ---------- */
.login-page { display: block; }
.custom-login-form-container {
  background-color: #f1f3f4;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.custom-login-card {
  background-color: #fff;
  padding: 48px 40px 36px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px rgba(60,64,67,.15);
  max-width: 400px;
  width: 100%;
  color: #202124;
  text-align: left;
}
@media (max-width: 480px) {
  .custom-login-card { padding: 36px 24px 28px; }
}
.custom-login-logo {
  display: block;
  margin: 0 auto 24px;
  width: 150px;
  max-width: 100%;
}
.custom-login-card h1 {
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 8px;
  text-align: center;
}
.custom-login-card p {
  margin: 0 0 32px;
  font-size: 14px;
  color: #5f6368;
  text-align: center;
}
.custom-login-input-group { margin-bottom: 24px; }
.custom-login-input-group input {
  width: 100%;
  padding: 14px 12px;
  border-radius: 4px;
  border: 1px solid #dadce0;
  background-color: transparent;
  color: #202124;
  font-size: 16px;
  font-family: inherit;
}
.custom-login-input-group input:focus {
  border-color: #1a73e8;
  outline: none;
  box-shadow: 0 0 0 1px #1a73e8;
}
.login-error {
  color: #d93025;
  font-size: 14px;
  text-align: left;
  margin: -12px 0 16px;
  min-height: 1.2em;
}
.login-error:empty { display: none; }
.submit { text-align: right; }
.submit input {
  background-color: #ffbd59;
  color: #fff;
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .25px;
  font-family: inherit;
}
.submit input:hover { background-color: #1558b0; }
.custom-login-footer {
  margin-top: 32px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}
.custom-login-footer a { color: #1a73e8; text-decoration: none; }
.custom-login-footer a:hover { text-decoration: underline; }

/* ---------- Inbox (shown after a correct login) ---------- */
.inbox-page {
  display: none;
  padding: 0 16px 30px;
  text-align: center;
}
.inbox-page.open { display: block; }
.inbox {
  display: flex;
  width: 100%;
  max-width: 1400px;
  margin: 20px auto;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  overflow: hidden;
  min-height: 90vh;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: left;
}

/* Sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #f1f3f4;
  padding: 16px;
  border-right: 1px solid #dadce0;
}
.compose-btn {
  display: block;
  width: 100%;
  background: #c2e7ff;
  border: none;
  padding: 12px 20px;
  border-radius: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  font-size: 14px;
}
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 20px;
  cursor: pointer;
}
.sidebar li:hover { background: #e8f0fe; }
.sidebar .material-icons { font-size: 20px; margin-right: 12px; }

/* Main area */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid #dadce0;
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; margin-right: 16px; }
.logo img { height: 40px; }
.topbar-left { display: flex; align-items: center; }
.topbar-left .material-icons { cursor: pointer; margin-right: 12px; }
.search-box {
  flex: 1;
  display: flex;
  justify-content: center;
  margin: 8px 0;
}
.search-box input {
  width: 100%;
  max-width: 500px;
  padding: 8px 12px;
  border: 1px solid #dadce0;
  border-radius: 24px;
  font-family: inherit;
  font-size: 14px;
}
.topbar-right .material-icons { cursor: pointer; margin-left: 12px; }

/* Email list */
.email-list { flex: 1; overflow-y: auto; }
.email-row {
  display: grid;
  grid-template-columns: 200px 1fr 180px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f3f4;
  cursor: pointer;
  align-items: center;
}
.email-row:hover, .email-row:focus { background: #f8f9fa; outline: none; }
.email-sender {
  font-weight: 500;
  color: #202124;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-subject {
  color: #202124;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-date { text-align: right; color: #5f6368; font-size: 12px; }

/* Email popup */
.email-content {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 1000;
  max-height: 90vh;
  overflow-y: auto;
  text-align: left;
  line-height: 1.5;
}
.email-content.open { display: block; }
.email-content h2 { margin-top: 0; font-size: 1.4rem; font-weight: 500; }
.email-content p { margin: 0 0 1em; }
.email-content .close-btn {
  display: inline-block;
  margin-bottom: 12px;
  cursor: pointer;
  color: #1a73e8;
  font-weight: bold;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
}
.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
}
.overlay.open { display: block; }

.logout-link {
  display: inline-block;
  margin-top: 10px;
  color: #1a73e8;
}

/* Phones and small tablets */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .inbox { flex-direction: column; }
  .email-row { grid-template-columns: 1fr; grid-row-gap: 4px; }
  .email-date { text-align: left; }
  .topbar { justify-content: center; }
  .search-box input { max-width: 100%; }
  .logo { width: 100%; justify-content: center; margin-bottom: 8px; }
}
