/*! HTML5 Boilerplate v8.0.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */
/* ==========================================================================
   Author's custom styles
   ========================================================================== */
/* #ece4e4 - base white
#fbfbfb
#0f0333
#44766f
#ff3366
#ad1e18
#ebc064
#89b9ac 
#3b82f6
#284283*/

* {
  box-sizing: border-box;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  background-color: #ece4e4;
}

nav {
  background-color: #fbfbfb;
  width: 80%;
  margin-bottom: 0;
  width: 1100px;
  margin: 0 auto;
  color: #0f0333;
  padding: 10px;
  display: flex;
  justify-content: space-between;
}

nav li {
  display: inline-block;
  margin: 0 0.5em;
  font-family: "Handlee", cursive;
  font-weight: 900;
  font-size: 1.5rem !important;
}

.menuBtn {
  display: none;
}

.logo {
  float: left;
  flex-grow: 1;
}

.userMenu {
  float: right;
}

.pageContainer {
  width: 100%;
  clear: both;
}

.content {
  display: flow-root;
  margin-top: -1em;
  background-color: #fbfbfb;
  width: 80%;
  width: 1100px;
  margin: 0 auto;
  text-align: center;
  font-family: "Lato", sans-serif;
  font-weight: 400;
  z-index: 2;
}

.footer {
  display: flex;
  bottom: 0;
  width: 1100px;
  margin: 0 auto;
  font-family: "Lato", sans-serif;
  font-weight: 400;
}

/* Profile Page */

.profileNavigation {
  width: 25%;
  float: left;
}

.profileContainer {
  margin: 2em 1em;
}

.profileNavigation ul {
  padding: 1.5em;
  text-align: right;
  list-style: none;
  min-height: 250px;
  border-right: #44766f 4px solid;
}

.profileContent {
  padding: 1.5em;
  text-align: left;
  width: 70%;
  float: right;
}
.collapsible-profile-fix {
  width: 100%;
  padding: 0.2em;
  background-color: #44766f;
  color: #ece4e4;
  margin: 0.5em 0;
}

/* Recipes Index */

.recipes tr:nth-child(even) {
  background-color: #fff;
  border-left: #fff;
  border-right: #fff;
}

.recipes tr:nth-child(odd) {
  background-color: #ece4e4;
}

.recipes td {
  border-bottom: #b2c4df 1px solid;
}

/* Recipe Edit Page */
.collapsible {
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 10px;
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: #f7f7f7;
  cursor: pointer;
  font-weight: bold;
}

.collapsible-header:hover {
  background-color: #eaeaea;
}

.toggle-arrow {
  display: flex;
  font-size: 1.5em;
  transition: transform 0.3s;
  transform: rotate(180deg);
}

.toggle-arrow.collapsed {
  transform: rotate(0deg);
}

.collapsible-content {
  display: none;
  padding: 15px;
  background-color: #fff;
}

.collapsible-content.visible {
  display: block;
}
.sticky-side-nav {
  position: fixed;    
  top: 100px;              
  width: 42px;
  left: calc(50% - 592px);      
  list-style: none;
  padding: 10px 0px 10px 10px;
  display: flex;
  flex-direction: column;
  z-index: 1; 
  pointer-events: auto;
}

.sticky-side-nav ul {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

.sticky-side-nav li {
  margin-bottom: 12px;
  background-color: #FFF; 
  padding: 5px 10px 0px 5px;
  border-radius: 5px 0px 0px 5px;
  box-shadow: inset -5px 0px 5px rgba(255, 255, 255, 0.3);
}

.sticky-side-nav a {
  writing-mode: vertical-rl;
  text-decoration: none;
  color: #333;
  font-weight: 800;
}

.sticky-side-nav li:hover {
  color:#284283;
}
.sticky-side-nav .active {
  border-style: solid none solid solid;
  border-width: 2px;
  border-color:  #284283;
}

.input-field {
  position: relative;
  margin-bottom: 20px;
}

.input-field input,
.input-field textarea {
  width: 100%;
  padding: 20px 10px 10px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  background-color: #f9f9f9;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.input-field label {
  position: absolute;
  top: 15px;
  left: 10px;
  transform: translate(0px, -10px);
  font-size: 14px;
  color: #aaa;
  pointer-events: none;
  transition: all 0.1s ease;
}


.input-field textarea {
  min-height: 100px;
  resize: vertical;
  float: left;
}
.errorEdit {
  color: #ad1e18;
  min-height: 0 !important;
  border-radius: 5px 5px 0px 0px;
  background-color: #FFDDDD;
  margin-bottom: -3px;
  line-height: 1.5rem;
  font-size: .75rem;
}

.prepTime,
.cookTime,
.servings,
.yield {
  width: 30%;
}

.title,
.description {
  width: 65%;
  float: right;
}

.description {
  min-height: 150px;
}

.removeGroup,
.removeIngredient {
  color: #284283;
  background-color: #fff;
}

.ingredient select,
.ingredient select::before,
.ingredient select::after {
  box-sizing: border-box;
}
.ingredient select::-ms-expand {
  display: none;
}
.ingredient select {
  appearance: none;
  background-color: rgba(0, 0, 0, 0);
  border: none;
  padding: 0 1em 0 0;
  margin: 0;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  cursor: inherit;
  line-height: inherit;
  outline: none;
}

.select {
  border: 0;
  padding: 0.25em 0.5em;
  cursor: pointer;
  background-color: #fff;
  grid-template-areas: "select";
  display: grid;
  align-items: center;
}
.select::after {
  content: "";
  width: 0.8em;
  height: 0.5em;
  background-color:#ece4e4;
  clip-path: polygon(100% 0%, 0 0%, 50% 100%);
  justify-self: end;
  position: relative;
}

.select select option {
  background: rgba(0, 0, 0, 0);
}
.select select,
.select:after {
  grid-area: select;
}

.select select:focus + .focus {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border: 2px solid #ece4e4;
  border-radius: inherit;
}

.ingredientsTableEdit tr:nth-child(even) {
  background-color: #ece4e4;
}

.ingredient input {
  background: none;
  border: 0;
  border-radius: 0;
  border-bottom: 1px #ece4e4 solid;
}

.ingredient  {
  border: 0;
}

.ingredientsTableEdit {
  margin: 1em auto;
  width: 80%;
}

.addButton {
  width: 100%;
  max-width: fit-content;
  padding: 0.5em 2em;
  color: #fff;
  border: #284283 1px solid;
  border-radius: 5px;
}

.ingredientsTableEdit table {
  margin: 0.5em auto;
}
.ingredientsTableEdit [class*="ingredientGroup_"] {
  width: 95%;
  float: left;
}
#deleteRecipeBtn {
  margin-top: 1.5em;
  background-color: #ad1e18;
}

#instructionContainer {
  width: 80%;
  margin: 0 auto;
}

.instructionsGroupContainer {
  overflow: auto;
  margin-bottom: 20px;
}

.instructionsGroupContainer button{
  width: 25%;
}
.instructionsGroupContainer > .instructionGroup button{
  width: 5% !important;
  border-radius: 0 5px 5px 0;
  min-height: 55px;
}
[class*="InstructionGroup"][class*="title"] {
  width: 95%;
  float: left;
  margin: 0 auto;
  min-height: 55px; 
}

[class*="InstructionGroup"][class*="title"] input{
  border-radius: 5px 0 0 5px;
}


.instruction {
  width: 85%;
  margin: 1em auto;
}

.instruction div{
  float: left;
  width: 95%;
}

.instruction textarea {
  border-radius: 5px 0 0 5px;
}

.instruction button{
  width: 4%;
  margin: 0;
  float: left;
  min-height: 100px !important;
  border-radius: 0 5px 5px 0;
  padding: 0;
}

[id*="_note"] {
  width: 30% !important;
}
.noteVisible {
  width: 70% !important;
}
/* recipe view page */

.recipeCard {
  background-image: url("/img/content.png");
  background-repeat: repeat;
  line-height: 29px;
}
.recipeCard h1 {
  line-height: 2.5em;
}
.recipeCard h2 {
  clear: both;
}
.recipeCard * {
  margin: 0 auto;
}
.recipeCard table {
  border-spacing: 0;
}
.author {
  float: left;
  display: block;
}
.lastEdited {
  display: block;
  float: right;
}
.ingredientsTableView {
  width: 49%;
}
#conversionTable {
  border: 5px solid #284283;
  border-radius: 5px;
}
.hideConversion {
  margin-top: 1.5em;
}
#conversionTable input {
  width: 8em;
}

/* Deleteion Confirmation dialog */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
  border-radius: 5px;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.btn-container {
  text-align: center;
  margin-top: 20px;
}

.btn {
  padding: 10px 20px;
  margin-right: 10px;
  cursor: pointer;
  border-radius: 5px;
  border: none;
}

.btn-danger {
  background-color: #ad1e18;
  color: white;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

input,
select,
textarea {
  font-size: 16px;
  padding: 6px;
  border-width: 2px;
  border-radius: 5px;
  border-color: #284283;
  background-color: #fbfbfb;
}
select {
  text-align: center;
}
textarea {
  width: 600px;
  margin: 0 auto;
}
button {
  font-size: 16px;
  padding: 6px;
  border-width: 0px;
  border-radius: 5px;
  background-color: #284283;
  color: #fbfbfb;
}
/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */
.popoutMenu {
  position: absolute;
  top: 50px; /* Adjust as needed */
  right: 10px; /* Adjust as needed */
  background-color: #333;
  color: white;
  padding: 10px;
  display: none; /* Initially hidden */
}

@media screen and (max-width: 1100px) {
  nav,
  .content {
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  nav {
    flex-direction: row;
    align-items: stretch;
  }
  .userMenu {
    display: none;
  }
  .menuBtn {
    display: block;
  }
  .popoutMenu {
    display: hide; /* Show the popout menu on smaller screens */
  }
  .menuBtn {
    width: 50px;
    float: right;
  }
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
