@import url("./vendors/loadingAnimation.css");

/* --------------- GENERAL STYLES --------------- */

:root {
  --card-header-background: #2e2e2e;
  --sticky-nav-height: 3.5rem;
  --theme-orange: #ff4b2b;
  --black-font: #444;
  --icon-yellow: #f3c943;
  --light-theme-yellow: #fcf2d3;
  --nav-background-color: #f6f5ff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-size: 16px;
  font-family: "Montserrat", Sans-serif;
  background-color: #fff;
  color: var(--black-font);
  text-rendering: optimizeLegibility;
}

main {
  min-height: 90vh;
}

a {
  text-decoration: none;
}

.capitalize {
  text-transform: capitalize;
}

.theme-color {
  color: var(--theme-orange);
}

/* General Button */

.btn {
  padding: 0 0.5rem;
  font-size: 1.2em;
  border: 1px solid #d4d3dd;
  color: var(--black-font);
  cursor: pointer;
  background-color: var(--nav-background-color);
  font-family: "Montserrat", sans-serif;
  outline: none;
  transition: background-color 0.5s;
}

.btn-border {
  padding: 0 0.5rem;
  font-size: 1.2em;
  border: 1px solid #d4d3dd;
  border-left: none;
  color: var(--black-font);
  cursor: pointer;
  background-color: var(--nav-background-color);
  font-family: "Montserrat", sans-serif;
  outline: none;
  transition: background-color 0.5s;
}

.btn:hover,
.btn-border:hover {
  background-color: var(--light-theme-yellow);
  opacity: 0.85;
}

/* ------------ Modal -------------*/

.modal-container {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: scale(1.1);
  transition: visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;
}

.modal-content {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 1rem 1.5rem;
  width: 24rem;
  border-radius: 0.5rem;
}

.modal-x-btn {
  float: right;
  width: 1.5rem;
  line-height: 1.5rem;
  text-align: center;
  cursor: pointer;
  border-radius: 0.25rem;
  background-color: lightgray;
  color: lightcoral;
  font-size: 1.4rem;
}
.modal-close-btn:hover {
  background-color: var(--nav-background-color);
}

.modal-content p {
  font-size: 1.2em;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.modal-content button {
  font-size: 1em;
  padding: 0.5rem;
  border: 1px solid var(--theme-orange);
  margin-right: 0.5rem;
}

.modal-content button:hover {
  color: var(--theme-orange);
}

.show-modal {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition: visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s;
}

/* create new button */
a.link-btn {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid var(--theme-orange);
  border-radius: 0.5rem;
  margin: 0 1rem 0.5rem;
  font-size: 0.9em;
  color: var(--theme-orange);
  transition: background-color 0.3s;
}
a.link-btn:hover {
  background-color: var(--nav-background-color);
}
a.link-btn:active {
  transform: scale(0.98);
}

.mob-display-none {
  display: none;
}

.display-block {
  display: block !important;
}

.display-flex {
  display: flex !important;
}

.display-none {
  display: none;
}

/* Number Input and button */
.inputContainer {
  display: flex;
  margin-top: 0.5rem;
  display: none;
}

.txtInput {
  width: 30%;
  min-width: 200px;
  height: 40px;
  border: 1px solid #d4d3dd;
  padding: 0.7rem;
  margin-left: 1rem;
  outline: none;
  font-size: 1em;
  font-weight: 400;
  letter-spacing: 1.5px;
}

/* General Page Title */
.page-title {
  display: flex;
  align-items: center;
  margin-left: 1rem;
  padding: 0 0.5rem;
  color: rgb(105, 105, 105);
}

.page-title h1 {
  font-weight: 100;
}

/* -------------- NAVIGATION ---------------- */

header a {
  color: inherit;
}

/* ------ Main Header Navbar ------- */
header {
  margin-bottom: 1rem;
}

header nav {
  background-color: #1a1a1a;
  color: #afafaf;
  padding: 0.5rem 1rem;
}

.logo {
  display: inline-block;
  font-size: 1.5em;
}

.icon {
  color: var(--light-theme-yellow);
  font-family: "Libre Baskerville", serif;
}
span.icon-text {
  color: #fff;
}
.navbar-toggle {
  position: absolute;
  top: 0.5rem;
  right: 2rem;
  font-size: 1.5em;
  cursor: pointer;
}

.main-navlinks {
  list-style-type: none;
  display: none; /* The folding --01*/
}

.visible {
  display: block; /* The collapsing --02 using js*/
}

.main-navlinks li {
  text-align: center;
  margin: 1rem auto;
  width: 100%;
}

.main-navlinks li:hover,
.navbar-toggle:hover {
  color: #f0f0f0;
}

/* --------- Sticky page nav --------- */

.page-nav-container {
  width: 100%;
  position: fixed;
  bottom: 0;
  display: flex;
  justify-content: center;
  background-color: #f6f5ff;
  border-top: 1px solid #cdd6e9;
  margin-top: 1rem;
  min-height: 3.5rem;
}

.page-nav {
  width: 100%;
  display: grid;
  grid-template-columns: 33.33vw 1fr 1fr;
  font-size: 1.4em;
  color: var(--black-font);
}

.page-nav li {
  list-style-type: none;
  height: var(--sticky-nav-height);
  /* line-height: 3.5rem; */
  display: inline-block;
  text-align: center;
}

.page-nav li:hover {
  color: var(--theme-orange);
  opacity: 0.95;
}

.nav-active {
  background-color: #e7e7e7;
  color: var(--theme-orange);
}

.page-nav a {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.sticky-nav-text {
  font-size: 0.6em;
}

/* ====================== ACCOUNTS DASHBOARD PAGE ======================  */
/* -------------MAIN CONTENT ----------------------- */

a.acct-summary {
  border-top: 1px solid #cdd6e9;
  display: block;
  padding: 1rem 0.5rem;
}

a.acct-summary:hover {
  background-color: var(--nav-background-color);
}

a.acct-summary:first-of-type {
  border-top: none;
}

.row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(30%, auto) auto auto;
  padding: 0 1rem;
  color: var(--black-font);
  font-size: 0.85em;
}

.digit {
  letter-spacing: 1.5px;
}

.row .acct-active {
  color: green;
  font-size: 70%;
  justify-self: flex-end;
}
.row .acct-dormant,
.row .acct-draft {
  color: rgb(196, 3, 3);
  font-size: 70%;
  justify-self: flex-end;
}

.select-account-modal {
  margin-bottom: 1rem;
}
.select-padded {
  padding: 0.5rem;
}

/* =========================== ALL TRANSACTIONS PAGE =========================  */

.hidden-op-section {
  margin-bottom: 2rem;
  display: none;
  flex-direction: column;
  align-items: flex-start;
}

.table-container {
  padding: 0 1rem;
  width: 100%;
}
/* Basic responsive table layout */

.table-layout caption {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
}

.table-layout thead,
.table-layout tbody {
  width: 100%;
}

.table-layout tr {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: center;
}

.table-layout th,
.table-layout td {
  word-break: break-all;
}

@media (min-width: 640px) {
  .table-layout tr {
    flex-direction: row;
  }
}

/* ----------------- Table Design --------------*/
.table-design {
  width: 100%;
  font-size: 0.8rem;
}

/* DISPLAY EACH ROW AS A CARD */
.table-design tbody tr {
  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2);
  margin-bottom: 1rem;
  cursor: pointer;
}

.table-design tbody th {
  font-weight: normal;
}

.table-design tbody th,
.table-design tbody td {
  display: flex;
  padding: 0.5rem;
}

/* INDIVIDUAL CELL HEADING STYLES */
.table-design tbody .col-header {
  width: 10rem;
  flex: 0 0 50%;
  padding: 0 2rem;
  text-align: right;
  line-height: 100%;
  font-weight: bold;
}

/* Hide table header thead */
.table-design thead {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
}

/* Show header on wide display */
@media (min-width: 640px) {
  .table-design {
    background-color: #fff;
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2);
    text-align: center;
    margin: 0 auto;
  }

  /* TABLE HEADER STYLING */
  .table-design thead {
    background-color: #f6f5ff;
    color: #444;
  }
  .table-design tbody th,
  .table-design tbody td {
    display: initial;
  }

  .table-design thead th {
    padding: 1rem 0.9rem;
    text-align: center;
    background-color: #1a1a1a;
    color: #afafaa;
  }

  .table-design thead {
    position: unset;
  }

  .table-design tbody tr {
    background: none;
    box-shadow: none;
    margin-bottom: 0;
  }

  .table-design tbody tr:nth-of-type(even) {
    background-color: #f8f8f8; /*#fdf7e3*/
  }

  .table-design tbody tr:hover {
    background: var(--light-theme-yellow);
  }

  /* Cells Width */
  .table-design thead th,
  .table-design thead td,
  .table-design tbody th,
  .table-design tbody td {
    width: 20%;
  }

  /* Hide Mobile Header */
  .table-design tbody .col-header {
    display: none;
  }
}

/* ---------------------- USER PROFILE PAGE --------------- */
.card-container {
  width: 90%;
  max-width: 480px;
  margin: 2rem auto;
  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2);
}

section.profile-card {
  min-height: 200px;
}

h2.card-main-header {
  height: 3rem;
  line-height: 3rem;
  text-align: center;
  background: var(--card-header-background);
  color: #f7f7f7;
  font-size: 1.5em;
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.card-data-header {
  height: 1.5rem;
  line-height: 1.5rem;
  text-align: center;
  background-color: var(--light-theme-yellow);
  margin-bottom: 0.5rem;
}

.profile-img-container {
  min-height: 150px;
  width: 150px;
  margin: 0 auto;
}

.profile-img {
  display: inline-block;
  height: 150px;
  width: 100%;
  border-radius: 50%;
}

.card-data-grid {
  display: grid;
  grid-template-columns: 50% 1fr;
  grid-auto-rows: minmax(2rem, auto);
  padding: 0 0.5rem;
  font-size: 0.85em;
  color: #131313;
}

.card-key {
  text-align: right;
  padding-right: 1.5rem;
}

.card-data-grid p,
.card-data-grid span {
  padding-bottom: 0.5rem;
}

.card-i {
  font-size: 1.2em;
  color: var(--theme-orange);
}
/* ------------------------- SINGLE ACCOUNT PAGE ------------------- */
.cashier-acct-op {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cashier-btn-container {
  display: flex;
  justify-content: center;
  flex-flow: row wrap;
  max-width: 480px;
  margin: auto;
}

/* -------------------------- ADMIN PAGES ------------------------ */
#admin-link {
  color: var(--light-theme-yellow);
}

#admin-link:hover {
  opacity: 0.9;
}

.row-admin {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(30%, auto) 1fr 1fr;
  padding: 0 1rem;
  color: var(--black-font);
  font-size: 0.85em;
}

i.fa-user-cog {
  padding-right: 1rem;
  color: var(--icon-yellow);
}

.staff-role-cell {
  text-align: center;
}

/* ---------------- Create New Staff Account Page ----------------- */
.main-form-container {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  width: 340px;
  min-height: 400px;
  margin: 3rem auto;
  padding: 1rem 0;
}

.main-form-container h1 {
  margin-bottom: 1rem;
}

.main-form-container form {
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 10px;
  height: 100%;
  text-align: center;
}

form > input,
form select {
  background-color: #f0f0f0;
  border: none;
  padding: 12px 15px;
  margin: 8px 0;
  width: 100%;
}

.main-form-container span {
  font-size: 0.8em;
  margin: 10px auto;
}

.main-form-container .radio-container {
  align-self: flex-start;
  font-size: 0.8em;
  margin-bottom: 0.4rem;
}

.main-form-container button {
  border-radius: 20px;
  border: 1px solid #ff4b2b;
  background-color: #ff4b2b;
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  padding: 12px 45px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: transform 80ms ease-in;
}

.main-form-container button:active {
  transform: scale(0.95);
}

.main-form-container button:focus {
  outline: none;
}

/* ------------------------- PAGE FOOTER ---------------------------*/
footer {
  background-color: lightcoral;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 0 1rem;
  min-height: calc(7.5rem + 3.5rem); /*plus sticky nav height*/
  color: var(--black-font);
  background-color: #f6f5ff;
  font-size: 0.8em;
  text-align: center;
}

ul.footer-links {
  margin: 1rem 0;
}

.footer-links li {
  display: inline-block;
  list-style-type: none;
  padding-right: 1.5rem;
}

footer p {
  line-height: 1.5;
  word-spacing: 0.4em;
}

footer a {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
}
footer a:hover {
  text-decoration: underline;
  color: initial;
}

/* Blank space after footer */
/* .white-space {
  height: 3.6rem;
} */

@media only screen and (min-width: 40rem) {
  .mob-display-none {
    display: unset;
  }

  /* Main header nav */
  header {
    margin-bottom: 0;
  }

  header nav {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
  }

  .main-navlinks {
    display: flex;
    flex-flow: row nowrap;
  }

  .main-navlinks li {
    margin: 0.5rem 0 0.5rem 3rem;
  }

  .navbar-toggle {
    display: none;
  }

  /* page sticky nav */
  .page-nav-container {
    position: sticky; /* important */
    top: 0; /* important */
    margin: 0 0 1rem;
    border-top: none;
    border-bottom: 1px solid #cdd6e9;
  }

  .page-nav {
    width: 60%;
    grid-template-columns: 30% 1fr 1fr;
    font-size: 1em;
  }

  .page-nav li {
    line-height: var(--sticky-nav-height);
  }

  .page-nav a {
    display: inline-block;
  }

  .sticky-nav-text {
    padding: 0 0.2rem;
    font-size: 1em;
  }

  .row {
    display: grid;
    grid-template-columns: minmax(30%, auto) repeat(3, 1fr);
    padding: 0 1rem;
    color: var(--black-font);
    font-size: 0.9em;
  }

  /* ------------------- ADMIN PAGES -------------------- */
  .row-admin {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(30%, auto) repeat(3, 1fr);
    padding: 0 1rem;
    color: var(--black-font);
    font-size: 0.85em;
    text-align: center;
  }

  /* ---------------- Create New Staff Account Page ----------------- */
  .main-form-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    width: 480px;
    min-height: 560px;
    margin: 3rem auto;
    padding: 1rem 0;
  }

  /* footer content */
  footer {
    align-items: flex-start;
  }
}
