* {
    font-family: monospace;
}

html {
  overflow-y: scroll;
  scrollbar-color: #daba3e #fff1b8;
  scrollbar-width: thin;
}

.header {
    display: flex;
    justify-content: center;
    align-content: center;
    overflow: hidden;
}

nav {
    text-align: center;
    word-spacing: 20px;
    font-size: 26px;
    margin-bottom: 30px;
    font-weight: bold;
}

/* Yarn bundle Img */
.heading-icon {
    max-width: 190px;
    min-width: 0;
    min-height: 215px;
    margin-bottom: 20px;
    margin-top: 17px;
}

/* Pattern Pantry Img */
.title-icon {
    max-width: 1050px;
    min-width: 0;
    max-height: 240px;
    margin-bottom: 20px;
    margin-top: 17px;
}

h2.page-title {
    font-size: 30px;
    text-align: center;
    color:#ffffff;

    text-shadow: 
    -1px -1px 0 #000,  
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

section.main-section {
    border: 4px solid #daba3e;
    background-color:#fff1b8;
    padding: 10px;
    border-radius: 15px;
    height: auto;
}

a:link, a:visited, a:hover, a:active {
    text-decoration: none;
}

a.link {
    display: inline-block;
    transition: transform 0.3s ease;
    color:#ffffff;
    border: 4px solid #daba3e;
    background-color:#fff1b8;
    padding: 10px;
    border-radius: 15px;
    width: fit-content;

    text-shadow: 
    -1px -1px 0 #000,  
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

a.link:hover, .as-btn:hover, .cp-btn:hover, .pp-btn:hover, .made-it-btn:hover {
    transform: scale(1.1);
}

html, body, label:hover {
  cursor: url("../images/cursor/point.png"), auto;
}

button:hover, a:hover, input:hover, textarea:hover, input[type="file"]::file-selector-button, select {
  cursor: url('../images/cursor/click.png'), pointer;
}

.as-form, .cp-form, .pattern-form {
    display: flex;
    justify-content: center;
}

.search-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.advanced-filter-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.advanced-filter-grid label,
.color-filter-group p {
  color: #ffffff;
  font-weight: 900;
  margin-bottom: 6px;

  text-shadow:
  -1px -1px 0 #000000,
   1px -1px 0 #000,
  -1px  1px 0 #000,
   1px  1px 0 #000;
}

.duration-controls {
  display: grid;
  grid-template-columns: 1fr 90px 90px;
  gap: 8px;
}

.color-filter-group {
  border: 2px solid #daba3e;
  border-radius: 10px;
  background-color: #fffbe7;
  padding: 10px;
}

.color-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.color-filter-options label {
  color: #ffffff;
  font-weight: 900;

  text-shadow:
  -1px -1px 0 #000000,
   1px -1px 0 #000,
  -1px  1px 0 #000,
   1px  1px 0 #000;
}

@media (max-width: 540px) {
  .duration-controls {
  grid-template-columns: 1fr;
  }
}

.as-btn, .cp-btn, .pp-btn, .made-it-btn {
    border-radius: 15px;
    background-color: #dbf0ff;
    padding: 7px;
    font-size: 30px;
    font-weight: 900;
    color:#ffffff;
    border: 2px solid #638ba8;
    transition: transform 0.3s ease;
    margin-bottom: 20px;
    margin-top: 20px;

    text-shadow: 
    -1px -1px 0 #000,  
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

#like-btn {
  background-color: #fffedb;
  border: 2px solid #a89063;
}

.like-num {
  font-size: 130%;
  color: #c7e9ff;
}

.pp-btn {
    align-self: center;
    margin-top: 25px;
}

.pattern-form {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding-right: 120px;
    align-items: flex-start;
    max-width: 1100px;
    margin: 0 auto;
    gap: 30px;
    font-size: 18px;
    font-weight: 900;
    color:#ffffff;

    text-shadow: 
    -1px -1px 0 #000000,  
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

.colors-used, .difficulty {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.color-option, .difficulty-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.colors-used p, .difficulty p {
    margin: 0;
    font-weight: bold;
    margin-right: 5px;
}

input[type="text"], textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

input[type="checkbox"] {
  vertical-align: middle;
  margin-right: 8px;
}

input[type="file"] {
    font-weight: 1000;
    font-size: 17px;
    color: #fdcece;
    text-shadow: 
    -1px -1px 0 #720000,  
     1px -1px 0 #720000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

.form-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.form-right {
    width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.pat-instructions {
    height: 500px;
    width: 100%;
    overflow-y: auto;
    border: 2px solid #daba3e;
    border-radius: 10px;
    padding: 10px;
    background-color: #fffbe7;
    box-sizing: border-box;
}

.round-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0.6rem;
}

.round-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Helpful Message Display when content is missing*/
.message {
    color:#fdd9d9;
    font-weight: 1000;
    font-size: 25px;
    text-align: center;
    align-items: center;
    justify-content: center;

    text-shadow: 
    -1px -1px 0 #000000,  
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

/* Pattern card image constraints & Photo Preview */
.pattern-card img, #photo-preview {
    max-width: 250px;
    max-height: 250px;
    border: 2px solid #daba3e;
    border-radius: 10px;
    margin-top: 15px;
    margin-left: 7px;
    margin-right: 7px;
}

#photo-preview {
  display: none;
}


/* Create pattern page resize-ability */
/* create form stacks on medium screens */
@media (max-width: 900px) {
  .pattern-form {
    flex-direction: column;
    padding-right: 0;
  }

  .form-right {
    width: 100%;
  }

  .pat-instructions {
    height: 400px;
  }

  .pp-btn {
    position: static;
    align-self: center;
    margin-top: 20px;
  }
}

/* tighten up on small screens */
@media (max-width: 600px) {
  .pattern-form {
    gap: 15px;
  }

  .pat-instructions {
    height: 300px;
  }

  input[type="text"], textarea {
    font-size: 16px; /* prevents iOS auto-zoom on focus */
  }
}

/* Pattern Card Display */
.pattern-card {
    background-color: #f3faff;
    border-radius: 15px;
    font-size: 15px;
    font-weight: 1000;
    color:#ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    border: 3px solid #cfb138;
    border-radius: 12px;

    text-shadow: 
    -1px -1px 0 #000000,  
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

/* Responsive Pattern Card Design */
.browse-section, .saved-section {
  display: grid;
  gap: 20px;
  padding: 20px;
  

  grid-template-columns: repeat(1, 1fr); /* default: phones */
}

/* small tablets */
@media (min-width: 600px) {
  .browse-section {
    grid-template-columns: repeat(2, 1fr);
  }
  .saved-section {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* tablets / small laptops */
@media (min-width: 945px) {
  .browse-section {
    grid-template-columns: repeat(3, 1fr);
  }
  .saved-section {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* desktop */
@media (min-width: 1200px) {
  .browse-section {
    grid-template-columns: repeat(4, 1fr);
  }
  .saved-section {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* large screens */
@media (min-width: 1600px) {
  .browse-section {
    grid-template-columns: repeat(5, 1fr);
  }
  .saved-section {
    grid-template-columns: repeat(5, 1fr);
  }
}


/* LOADING ANIMATION */
.loading-gif {
  width: 120px;
  height: auto;
  margin-bottom: 10px;
}

.crochet-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 40px;
}

.loading-text {
  margin-top: 15px;
  font-size: 20px;
  font-weight: bold;
  color:#ffffff;
  align-items: center;

  text-shadow: 
    -1px -1px 0 #000000,  
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

.loading-gif-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  width: 100%;
}

.pattern-detail-inner {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 30px;
  font-size: x-large;
  color:#ffffff;
  box-sizing: border-box;
  text-shadow: 
    -1px -1px 0 #000000,  
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

.pattern-detail-img {
  max-width: 500px;
  max-height: 500px;
  border: 3px solid #daba3e;
  border-radius: 10px;
  margin-left: 50px;
}

.pattern-detail-left {
  flex: 1.1;
  text-align: center;
  box-sizing: border-box;
}

.pattern-detail-right {
  margin-top: 50px;
  flex: 1;
  font-size: xx-large;
  min-width: 290px;
  background-color: #fcfbf3;
  border-radius: 15px;
  border: 3px solid #daba3e;
  border-radius: 12px;
  padding: 20px;
  line-height: 2;
  box-sizing: border-box;
}

.pattern-detail-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

.pattern-detail-info {
  margin-top: 50px;
  background-color: #fcfbf3;
  border: 3px solid #daba3e;
  border-radius: 12px;
  padding: 20px;
  flex: 1;
  text-align: left;
  margin-left: auto;
  margin-right: auto;
  max-width: 500px;
  box-sizing: border-box;
}

/* pattern detail stacks on large screens */
@media (max-width: 1600px) {
  .pattern-detail-top {
    flex-direction: column;
    align-items: center;
  }

  .pattern-detail-img {
    margin-left: 0;
  }

  .pattern-detail-info {
    margin-top: 15px;
    width: 100%;
  }
}

/* pattern detail stacks on medium screens */
@media (max-width: 900px) {
  .pattern-detail-inner {
    flex-direction: column;
  }

  .pattern-detail-right {
    margin-top: 0;
    min-width: unset;
    width: 100%;
  }
}

/* image and info stack on small screens */
@media (max-width: 600px) {
  .pattern-detail-top {
    flex-direction: column;
    align-items: center;
  }

  .pattern-detail-img {
    margin-left: 0;
    max-width: 100%;
  }

  .pattern-detail-info {
    margin-top: 15px;
    max-width: 100%;
    width: 100%;
  }
}

/* Favorite Button */
.fav-btn {
  width: 40px;
  height: 40px;
  cursor: url('../images/cursor/click.png'), pointer;
  transition: transform 0.2s ease;
}

.fav-btn:hover {
  transform: scale(1.2);
}

.pattern-name {
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 10px;
  font-size: 180%;
}

.fav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.card-fav-btn {
  width: 30px;
  height: 30px;
  cursor: url('../images/cursor/click.png'), pointer;
  transition: transform 0.2s ease;
  border: none !important;
}

.card-fav-btn:hover {
  transform: scale(1.2);
}

.round-title, .pattern-name, .round-sec-title, .pattern-name-v2 {
  color: #ffeda4;
}

.pattern-name-v2 {
  font-size: 130%;
}

.time-txt {
  font-size: 110%;
  color: #c7e9ff;
}

.round-sec-title {
  text-align: center;
  font-size: 170%;
}

.round-title {
  font-size: 117%;
}

.card-title {
  color: #fff3c1;
  font-size: 150%;
}

.card-info p {
  text-decoration: bold;
  text-align: center;
}

.made-it-btn {
  display: block;
  margin: 0 auto;
}

.feed-wrapper { 
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.feed-nav-row {
  display: flex;
  justify-content: center;
  gap: 10px;
}

#made-it-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 50px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

#browse-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  min-width: 0;
  overflow: hidden;
}

.arrow-btn {
  font-size: 30px;
  background: #fcfbf3;
  border: 3px solid #daba3e;
  border-radius: 17px;
  padding: 10px 14px;
  color: #daba3e;
  flex-shrink: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.arrow-btn:disabled { opacity: 0.3; }
.arrow-btn:not(:disabled):hover { transform: scale(1.1); }

@media (max-width: 945px) {
  .feed-wrapper {
    gap: 5px;
  }
  .arrow-btn {
    padding: 6px 8px;
    font-size: 20px;
  }
}