/* CSS to hide the honeypot field */
.honeypot-wrapper,
input[name="user[signup_timestamp]"],
.additional-preferences,
.preference-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* Add some misdirection */
.additional-preferences {
  display: block;
  visibility: visible;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

html {
  height: 100vh;
  width: 100vw;
}

p, h1, h2 {
  margin: 0.9rem;
}

/* Mobile Header title shrink */
@media(max-width: 767px) {
  h1#index_title {
    font-size: 1.8em;
 } 
 h2 {
  font-size: 1.3em;
 }

 h3 {
  font-size: 1.1em;
 }
}

h3, h4, h5, h6 {
  margin: 0.6rem;
}

body {
  max-width: 100vw;
  min-width: fit-content;
  background-color: white;
  margin: 0;
  height: 100%;
}

form {
  border: 2px;
  border-style: dotted;
  padding: 1rem;
  width: clamp(150px, 75%, 700px); 
}

form.button_to {
  border: none;
  padding: 0.5rem;
}

.helpscout {
  background-color: aquamarine;
  padding: 1rem;
  width: fit-content;
  max-width: 90vw;
}

.helpscout button {
  background-color: orange;
  padding: 0.8rem;
}

.main_menu {
  display:flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.main_menu > * {
  padding: 0.5rem;
}

/* Dash layout */

.header {
  display: flex;
  justify-content:space-between; 
  align-items: center;
  padding-left: 0.5rem;
}

main {
  height: 100%;
  /* max-width: 100vw; */
  width: clamp(auto, 100%, 100vw);
}

main.dash {
  /* display: flex; */
  background-color: lightgrey;
  min-height:300px;
  /* height: inherit; */
  /* flex-grow: 1; */
  width: inherit;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 1rem;
  padding-bottom: 3rem;
}

footer {
  display: flex;
  align-items: center;
  height: 40px;
  width: inherit;
  padding: 1rem;
  background-color: lightsteelblue;
}

.card {
  border: solid;
  border-width: 2px;
  padding: .5rem;
  margin: .5rem;
  background-color: ghostwhite;
  width: clamp(280px, 90%, 600px);
  /* For longer URLs in narrows cards: */
  word-wrap: break-word;   /* Older property */
  overflow-wrap: break-word; /* Standard property */
  /* word-break: break-all;  */    /* Break words if needed */
  /* hyphens: auto;  /*     /* Optional: adds hyphens when breaking words */
}

.card .card {
  width: clamp(180px, 90%, 400px);
  margin-left:0px;
}

div.card.policy {
  width: clamp(300px, 90%, 700px);
  /* This was causing my mobile menu to get hidden on Show#ShippingPolicy: */
  /* transform: scale(0.8) translate(-10%, -10%); */
}

#stores, #locations, #order_processing_profile, 
#shipping_profiles, #shipping_zones, #local_deliveries {
  display: flex;
  flex-wrap: wrap;
  padding: 1rem;
}

input {
  margin: .3rem;
  padding: .6rem;
  /* padding-right: 3rem; */
  /* width: 60%; */
  /* min-width: fit-content; */
  /* width: auto; */
  width: clamp(110px, 75%, 500px); 
  /* border: 1px solid; */
}

.updatebutton {
  margin: 1rem;
  padding: 1rem 1.5rem;
  background-color:lightgreen;
  width: fit-content;
  block-size: fit-content;
}

.destroy {
  margin-top: 0.5rem;
  padding: 1rem 1.5rem;
  background-color:lightcoral;
  color: white;
}

table {
  border: 1px solid;
  border-collapse: collapse;
}

td, th {
  padding:1rem;
}

button {
  box-shadow: none;
  font-weight: 400;
  padding: 1.1rem 2.1rem;
  width: auto;
  margin: 0.3rem;
  border-radius: 6px;
  border: 1px solid black; /* Sets a border color for the button */
  color: black; /* Sets the text color to black */
  font-size: 14px; /* Adjust font size as needed */
}

.Danger > button {
  background-color: lightcoral;
}

button.Update, input.Update, a.Update {
  background-color: lightgreen;
}

button.Logout {
  background-color: lightblue;
}

div.field * {
  font-size: 16px;
}

input[type="radio"] {
  width: 0%;
  min-width: fit-content;
}

/* Mobile Dash sidebar/menu */
@media(max-width: 767px) {
  .Dash_sidebar {
    display: none;
  }
  .Dash_menu {
    /* background-color: #88a550; */
  }
  .dropdown-container {
    min-width: 100px;
    max-width: 250px;
    margin: 20px auto;
    text-align: center;
    line-height: 50px;
    font-size: 15px;
    color: rgb(247, 247, 247);
    cursor: pointer;
    position: relative;
  }

  .dropdown-container a {
    color: white;
  }
  
  .menu-title {
    background-color: rgb(163, 162, 162);
    margin: 1rem;
  }

  /* Mobile-only menu */
  .dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: rgb(99, 97, 97);
    display: none;
    /* "You need to specify a transform-origin property to make 
    the dropdown menu start transforming from the top */
    transform-origin: top;
    animation: 0.2s bounce 1;
    position: absolute; /* To keep it from expanding parent element */
    min-width: 100px;
    width: 300px;
    text-align: center;
    line-height: 50px;
    font-size: 15px;
    color: rgb(247, 247, 247);
    cursor: pointer;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    transform: translate(-40%, 0%);
  }
  
  ul.dropdown-menu li:hover {
    background: rgb(47, 46, 46);
  }
  
  .visible {
    display: block;
  }

  /* Animation for mobile dropdown menu (.dropdown-menu) */
  @keyframes bounce {
    from {
       /* 0% height */
       transform: scaleY(0) translate(-40%, 0%);
       ;
      
      /* background-color: red; */
    }
    /* You need to add an intermediate step to the 
    keyframe at rule to implement the bounce illusion. */
    90% {
      /* transform: scale(2); */
      /* background-color: blue; */
      /* Stretch to 110% height */
      transform: scaleY(1.1) translate(-40%, 0%);
    }

    to {
      /* Return to 100 height% */
      transform: scaleY(1.0) translate(-40%, 0%);
      /* background-color: green; */
    }
  }

  #navbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: lightseagreen;
    height: inherit;
    width: 100%;
  }

  #navbar * {
    padding: .2rem;
    margin: .2rem;
  }

  #nav-main {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Fills the remaining height */
  }

}

/* Desktop Dash sidebar */
@media(min-width: 768px) {
  .Dash_menu {
    display: none;
  }
  
  .Dash_sidebar {
    display: flex;
    flex-direction: column;
    padding: 10px;
    /* background-color: #88a550; */
    /* font-size: 1.1rem; */
    width: inherit;
  }

  .Dash_sidebar a {
    color: white;
    text-decoration: none;
    font-weight: bold;
  }

  #navbar {
    /* display: flex; */
    background-color: lightseagreen;
    min-height: 100px;
    /* height: auto; */
    width: 220px;
    /* padding-left: 1rem; */
  }

  #nav-main {
    display: flex;
    /* align-items: stretch; */
    /* minus the header & footer width: */
    width: 100vw;
    flex-grow: 1; /* Fills the remaining height */
  }
  
  nav > ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
    font-size: 1.1rem;
  }
  
  nav > ul > li {
    margin: .5rem;
    padding-top: .5rem;
    padding: .5rem .5rem .5rem 0rem;
  }
}

#store_is_default, #user_remember_me, 
#shipping_policy_store_pickup_offered_true,
#shipping_policy_store_pickup_offered_false {
  width: 0%;
  min-width: fit-content;
}

form#new_user {
  width: clamp(250px, 50%, 500px); 
}

/* Making an link element look like a button */
a.btn {
  display: inline-block;
  padding: 1rem 1rem;
  background-color: lightgreen;
  color: black;
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  border: 1px solid;
}

.container {
  display: flex;
  flex-direction: column; /* This makes the container stack its children vertically */
  height: 100vh; /* Full viewport height */
}

.content {
  flex-grow: 1; /* Fills the remaining height */
}
