html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

@media (min-width: 600px) {
  .exercise-modal-container {
    width: 400px;
    left: 50%;
    transform: translate(-50%, 0);
    border-radius: 20px 20px 20px 20px;
  }
}

body {
  padding-top: 50px;
  margin-bottom: 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: #f2f2f7;
  color: #000;
}

:root {
  --vh: 1vh;
}

/* Buttons, Forms, and Focus Styling */
.btn:focus, 
.btn:active:focus, 
.btn-link.nav-link:focus, 
.form-control:focus, 
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Update Toast for APP Updates popup styling */
.toast.update-toast {
    position: fixed !important;
    bottom: 2rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #ffffff !important;
    color: #007aff !important;
    border: 2px solid #007aff !important;
    border-radius: 16px !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.08) !important;
    z-index: 999999 !important;
    opacity: 1 !important;
    pointer-events: all !important;
    display: block !important;
    padding: 1rem 2rem !important;
    transition: 
        opacity 0.3s cubic-bezier(.4,0,.2,1),
        transform 0.3s cubic-bezier(.4,0,.2,1);
}

.toast.update-toast.show {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important; /* Slide up */
    pointer-events: all !important;
}

.toast.update-toast.hide {
    opacity: 0 !important;
    transform: translateX(-50%) translateY(40px) !important; /* Slide down */
    pointer-events: none !important;
}

/* Index Container */
.index-container {
  max-width: 600px;
  margin: 0 auto;
}

/* Index install buttons */
.index-btn {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Index install button hover */
.index-btn:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Updates Button outline */
.btn-outline-primary {
  border-color: #007aff;
  color: #007aff;
}

/* Updates button hover */
.btn-outline-primary:hover {
  background-color: #007aff;
  color: white;
}

/* Header Styling */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

/* Header navbar styling */
header .nvabar {
  min-height: 50px;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 0.9rem;
}

/* Settings Page */
.settings-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 1.5rem;
  background-color: #f2f2f7;
  border-radius: 12px;
}

.settings-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.settings-section {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.settings-button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background-color: #ffffff;
  border: none;
  text-align: left;
  font-size: 1rem;
  color: #007AFF;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.settings-button:hover {
  background-color: #f0f0f5;
}

/* Updates & Bug Fixes Modal Container */

.updates-modal-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: calc(var(--vh, 1vh) * 90);
  background: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  -webkit-overflow-scrolling: touch;
  z-index: 1050;
}

/* Show The Modal */
.updates-modal-container.show {
  transform: translateY(0);
}

/* Header With A Bolded Title */
.updates-modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #ccc;
  font-weight: 600;
  font-size: 1.25rem;
}

/* Updates List Scrollable Area */
.updates-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 auto;
  max-height: calc(90vh - 130px);
  height: 100%;
  overflow-y: auto;
  padding: 0;
  margin: 0;
}

/* Updates List Footer */
.updates-modal-footer {
  border-top: 1px solid #ccc;
  position: sticky;
  bottom: 0;
  background: #fff;           
  text-align: center;
  padding: .25rem 1.5rem;      
}

.updates-modal-footer p {
  margin: 0;
  font-style: italic;         
}

/* How to install ERND Modal Container */

.howTo-modal-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: calc(var(--vh, 1vh) * 90);
  background: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  -webkit-overflow-scrolling: touch;
  z-index: 1050;
}

/* Show The Modal */
.howTo-modal-container.show {
  transform: translateY(0);
}

/* Header With A Bolded Title */
.howTo-modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #ccc;
  font-weight: 600;
  font-size: 1.25rem;
}

/* how to install list Scrollable Area */
.how-to-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 auto;
  max-height: calc(90vh - 130px);
  height: 100%;
  overflow-y: auto;
  padding: 0;
  margin: 0;
}

/* How to isntall images wrapper */
.install-image-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* How to intall images styling */
.how-to-list img {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0.5rem auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Reorder Instruction */
.reorder-instruction {
  text-align: center;
  font-size: 0.95rem;
  font-style: italic;
  color: #666;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #ddd;
  background-color: #f9f9f9;
}

/* Exercise Card Block */
.exercise-block {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 1rem;
  margin: 0.5rem 1rem;
  transition: box-shadow 0.2s ease;
  cursor: grab;
  border: 1px solid #e5e5ea;
}

.exercise-block:active {
  cursor: grabbing;
}

.exercise-block.drag-over {
  border: 2px dashed #007aff;
  background-color: #eef5ff;
}

/* Exercise Title */
.exercise-block h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

/* Sets Container */
.sets-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.sets-container input[type="number"] {
  flex: 1 1 45%;
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}

/* Add Set Button */
.exercise-block button {
  background-color: #007aff;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.exercise-block button:hover {
  background-color: #005bb5;
}

/* Current Workout Modal Container */

.current-workout-modal-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: calc(var(--vh, 1vh) * 90);
  background: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1050;
}

.current-workout-modal-container.show {
  transform: translateY(0);
}

.current-workout-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #ccc;
  font-weight: 600;
  font-size: 1.25rem;
}

.current-workout-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 auto;
  max-height: calc(90vh - 130px);
  overflow-y: auto;
  padding: 0;
  margin: 0;
}

.current-workout-modal-footer {
  position: sticky;
  bottom: 0;
  background: #ffffff;
  z-index: 1;
  padding: 1rem 1.5rem;
  border-top: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Section For Exercise Modal */

/* Exercise Modal Container */
.exercise-modal-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: calc(var(--vh, 1vh) * 90);
  background: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1050;
  overflow: hidden;
}

/* Show The Modal */
.exercise-modal-container.show {
  transform: translateY(0);
}

/* Header With A Bolded Title */
.exercise-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e5ea;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* .exercise-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
} */

/* Exercise List Scrollable Area */
.exercise-list {
    max-height: 70vh;     /* Adjust as needed */
    overflow-y: auto;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
}

.exercise-list details {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.exercise-list summary {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 1.25rem;
  background-color: #f2f2f7;
  border-bottom: 1px solid #e5e5ea;
  position: relative;
  cursor: pointer;
  list-style: none;
  color: #333;
}

.exercise-list summary::after {
  content: "›";
  font-size: 1.1rem;
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
  color: #555;
}

.exercise-list details[open] summary::after {
  transform: translateY(-50%) rotate(90deg);
}

/* Current Exercise Sets Styling */
.exercise-sets-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.exercise-category-header {
  font-weight: bold;
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
  color: #333;
  border-bottom: 1px solid #ccc;
}

/* Each Exercise Item With An IOS Contact List Style */
.exercise-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border-bottom: 1px solid #f0f0f5;
  background-color: #fff;
  transition: background-color 0.2s ease;
}

.exercise-list-item:hover {
  background-color: #f9f9fb;
}

.exercise-list-item:last-child {
  border-bottom: none;
}

/* Style For Checkbox */
.exercise-list-item input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: #007aff;
  cursor: pointer;
}

.exercise-list-item input[type="checkbox"]:checked {
  background-color: #007aff;
  border-color: #007aff;
}

.exercise-list-item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Fixed Footer With Buttons */
.exercise-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #ccc;
  background: #fff;
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.exercise-category-header {
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  padding-left: 0.25rem;
  color: #555;
  border-bottom: 1px solid #e5e5ea;
}

.exercise-modal-footer .btn-primary,
.exercise-modal-footer .btn-secondary {
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  width: 100%;
}

/* IOS Style Buttons */
.btn-primary {
  background-color: #007aff;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.btn-secondary {
  background-color: #f2f2f7;
  color: #007aff;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

/* Close Updates List */
.btn-close-updates, .btn-close-howTo {
  background-color: #f2f2f7;
  color: #007aff;
  border: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  min-width: 120px;
}

.btn-secondary:hover {
  background-color: #d6d6db;
}

.btn-close-updates:hover, .btn-close-howTo:hover {
  background-color: #d6d6db;
}

/* IOS Style Modal For When There's An Active Workout In Progress */
.modal.hidden {
  display: none;
}

.modal.show {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* For a Dark Overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Workout History Styling --> White Cards with a shadow for workout entries */
.workout-card {
  background-color: #ffffff;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  text-align: left;
  position: relative;
}

/* Workout History Card Delete Button */
.delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: red;
}

/* Social Icons */
.social {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.social-item a {
    text-decoration: none;
    color: inherit;
}

.social .material-symbols-outlined {
    font-size: 36px;
    color: #9c9da0;
    transition: transform 0.5s, color 0.5s;
}

.social .material-symbols-outlined:hover {
    color: #10237c;
    transform: rotate(360deg);
}

.social-label {
    margin-top: 0.25rem;
    font-size: 14px;
    color: #9c9da0;
}


/* Privacy Policy */
.privacy-policy {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

.privacy-policy h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.privacy-policy h2 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}