﻿/* ===== Base Reset ===== */
* {
  margin: 0;
  padding: 0;
  0: border-box;
}

body {
  font-family: 'Lato', sans-serif;
  background-color: #fdf7f2; /* cozy cream */
  color: #5b436c; /* soft plum */
  line-height: 1.6;
  padding: 20px;
}

h1, h2, h3 {
	font-family: Playfair Display, serif;
	color: #5b436c;
}

p {
	color: #5b436c;
	font-size: 22px;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #c8b8db;
}

.tablink {
  flex: 1;
  padding: 12px;
  cursor: pointer;
  background: #d7c0f0;
  border: none;
  outline: none;
  font-size: 16px;
  color: #5b436c;
  font-weight: bold;
  transition: background 0.3s ease;
}

.tablink.active {
  background: #c8b8db;
  border-bottom: 3px solid #5b436c;
}

.tablink:hover {
  background: #dacaf7;
}

.tabcontent {
  display: none;
  background: #fff;
  border: 2px solid #c8b8db;
  border-radius: 8px;
  padding: 20px;
  margin-top: 10px;
}

/* ===== Companion Picker Modal ===== */
.companion-modal {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(91, 67, 108, 0.8); /* lavender overlay */
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #f3eefb;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.modal-content h1 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #5b436c;
}

/* Companion Options */
.options {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.option {
  cursor: pointer;
  padding: 10px;
  border: 2px solid #c8b8db;
  border-radius: 10px;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 120px;
  text-align: center;
}

.option:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.option img {
  width: 80px;
  height: auto;
}

.option h2 {
  font-size: 14px;
  margin-top: 8px;
  color: #5b436c;
}

/* ===== Companion Display ===== */
#companion {
  position: fixed;
  bottom: 50px;
  right: 50px;
  text-align: center;
  z-index: 999;
  cursor: pointer;
}

#companion img {
  width: 100px;
  height: auto;
}

#companion-speech {
  background: #f3eefb;
  color: #5b436c;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.rowcounter,
.stitchcounter {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 60px;
	background-color: #f3eefb;
	padding: 20px;
	color: #5b436c;
	width: 60%;
	margin: 20px auto;
}

.rowcounter label,
.stitchcounter label,
.rowcounter input,
.stitchcounter input {
	font-size: 24px;
	padding: 5px 10px;
}

.reset,
.addyarn,
.addhook, 
.addproject,
.addyarnstash,
.delete {
	border: 2px solid #5b436c;
	background-color: #d7c0f0;
	color: #5b436c;
	font-size: 24px;
	padding: 5px 10px;
	margin-top: 20px;
	cursor: pointer;
	transition: background-color 0.3s ease-in;
}

.reset:hover,
.addyarn:hover,
.addhook:hover,
.addproject:hover,
.addyarnstash:hover,
.delete:hover {
	background-color: #c8b8db;
}

.newproject h2 {
	margin-top: 20px;
	font-size: 30px;
	font-weight: 600;
}

#addproject,
#addyarnstash {
	display: flex;
	flex-direction: column;
	margin: 20px;
	width: 60%;
	background-color: #f3eefb;
	color: #5b436c;
	font-size: 24px;
	gap: 40px;
	padding: 30px;
	justify-content: center;
	border-radius: 12px;
    box-shadow: 0 4px 15px rgba(91, 67, 108, 0.2);
    font-family: 'Playfair Display', serif;
}

#projectname,
.hooksize,
.yarntype {
	display: flex;
	flex-direction: column;
	gap: 20px;
	white-space: nowrap;
}

#projectname input,
.hooksize input,
.yarntype input {
    width: 100%;
    padding: 10px;
    border: 2px solid #c8b8db;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

form input:focus {
    border-color: #a287c2;
    box-shadow: 0 0 6px rgba(162, 135, 194, 0.5);
    outline: none;
}

.inputoption {
	display: flex;
	gap: 30px;
}

.section-divider {
    text-align: center;
    color: #a287c2;
    margin: 20px 0;
    font-style: italic;
    font-size: 26px;
}

.yarn-card {
    background: #f3eefb;
    border: 2px solid #c8b8db;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 4px 8px rgba(91, 67, 108, 0.2);
}

.yarn-card h3 {
    margin-bottom: 8px;
    color: #5b436c;
}

.yarn-card button {
    background: #d7c0f0;
    border: 2px solid #5b436c;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.yarn-card button:hover {
    background: #c8b8db;
}


@media (max-width: 768px) {

body {
  padding-bottom: 200px; 
  align-items: center;
  display: flex;
  flex-direction: column;
}


/* Pin companion to bottom center */

#companion {
  position: fixed !important;  
  bottom: 0;                  
  left: 0;
  width: 100%;               
  display: flex;
  justify-content: center;
  background: transparent; 
  z-index: -1;       
  padding: 10px 0;
  margin-bottom: 20px;
}

#companion img {
  width: 90px;
  height: auto;
}

.rowcounter,
.stitchcounter {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 20px;
	background-color: #f3eefb;
	padding: 10px;
	color: #5b436c;
	width: 100%;
	margin: 20px auto;
}

.rowcounter input,
.stitchcounter input {
	width: 100%;
}

#addproject,
#addyarnstash,
#counter {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 20px;
	width: 80%;
	background-color: #f3eefb;
	color: #5b436c;
	font-size: 24px;
	gap: 40px;
	padding: 30px;
	justify-content: center;
	margin: auto;
	border-radius: 12px;
    box-shadow: 0 4px 15px rgba(91, 67, 108, 0.2);
    font-family: 'Playfair Display', serif;
}

#projectname,
.hooksize,
.yarntype {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	white-space: nowrap;
}

#projectname input,
.hooksize input,
.yarntype input {
    width: 100%;
    padding: 10px;
    border: 2px solid #c8b8db;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.inputoption {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

}