/* =========================================================================
   FILE: styles.css
   PURPOSE: Base styles for modular converter app
   AUTHOR: Jack Ewers / bloodweb.net
   LAST UPDATED: 2025-07-22
   ========================================================================= */

/* Reset & Base */
body, html {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: #f0f0f0;
  color: #222;
  height: 100vh;
  overflow: hidden;
}


/*#########################################################################*/
/*     Header    */
/*#########################################################################*/

.app-header{
  background-color: #666;
  color: white;
  display:flex;
  align-items:center;
  justify-content: space-around;
}

/* Toggle Buttons */
button.toggle{
  all: unset; /* Remove all default button styles */
  background: #20232a;
  color: white;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5em;
  height: 2.5em;
  font-size: 1.2em;
  background: black;
  cursor: pointer;
  border-radius: 0.25em;
  transition: background 0.2s ease;
}

button.toggle:hover {
  background: rgba(0, 0, 0, 0.1);
}


#toggle-settings:hover,#toggle-nav:hover {
  background: #333;
}
/* ########################################################################### */



.toggle-nav:hover {
  background: #333;
}

.app-container {
  display: flex;
  height: 100vh;
  width: 100%;
  position: relative;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: #20232a;
  color: white;
  padding: 1.5rem 1rem 1rem 1rem;
  box-sizing: border-box;
  overflow-y: auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 10;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
}

.sidebar h1 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar h1::before {
  content: "\1F4CA"; /* 📊 */
  font-size: 1.5rem;
  display: inline-block;
}

.sidebar.hidden {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

#nav-items button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  background: #444;
  color: white;
  border: none;
  cursor: pointer;
  text-align: left;
  border-radius: 4px;
  font-size: 1rem;
  gap: 0.5rem;
}

#nav-items button::before {
  content: "\2699"; /* ⚙️ */
  font-size: 1rem;
  opacity: 0.7;
}

#nav-items button:hover {
  background: #555;
}



/* Main Content */
.main-content {
  flex: 1;
  padding: 5rem 2rem 2rem 2rem;
  overflow-y: auto;
  box-sizing: border-box;
  position: relative;
}

.main-header h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

.converter-block {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
  max-width: 500px;
}

.converter-block label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.converter-block input,
.converter-block select,
.converter-block button {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  box-sizing: border-box;
}

.input-row {
  display: flex;
  gap: 0.5rem;
}

.input-row input {
  flex: 2;
}

.input-row select {
  flex: 1;
}

.result-container {
  margin-top: 1rem;
  font-size: 1.2rem;
}

/* Footer */
.main-footer {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #666;
}

/* Notification */
.app-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  font-size: 0.95rem;
  z-index: 30;
}


/* GAUGER CONVERTER */
.gauge-block {
  margin-top: 1rem;
}

.gauge-block label {
  display: block;
  margin-top: 0.75rem;
  font-weight: 600;
}

.gauge-block input {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  margin-top: 0.25rem;
  box-sizing: border-box;
}

.gauge-select {
  width: 100%;
  font-size: 1.25rem;
  padding: 0.5rem;
  margin-top: 0.25rem;
}


/* TEMP CONVERTER */
.temp-block {
  margin-top: 1rem;
}

.temp-block label {
  display: block;
  margin-top: 0.75rem;
  font-weight: 600;
}

.temp-block .temp-input {
  width: 100%;
  font-size: 1rem;
  padding: 0.5rem;
  margin-top: 0.25rem;
  box-sizing: border-box;
}


/* COLOR NAME */
.color-block {
  margin-top: 1rem;
}

.color-block label {
  display: block;
  margin-top: 0.5rem;
  font-weight: 600;
}

.color-block input {
  width: 100%;
  font-size: 1rem;
  padding: 0.5rem;
  margin-top: 0.25rem;
  box-sizing: border-box;
}

.color-preview-row {
  display: flex;
  align-items: center;
  margin-top: 1rem;
  gap: 1rem;
}

.color-preview {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.color-info p {
  margin: 0.2rem 0;
  font-size: 0.95rem;
}

/* IMAGE CONVERTER */
.image-converter-block input[type="file"],
.image-converter-block select {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

#img-download-link {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 12px;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

#img-download-link.hidden {
  display: none;
}
#quality-wrapper {
  margin-top: 10px;
}

#quality-wrapper.hidden {
  display: none;
}

#img-quality {
  width: 100%;
}
