/* Basic Styles */
body {
    margin: 0;
    background-color: #f0f0f0;
    line-height: 1.6; /* Add some line height */
    position: relative; /* Needed for absolute positioning of #add-exercise-container */
    min-height: 100vh; /* Ensure body takes up at least full viewport height */
}

header {
    background-color: #333;
    color: white;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem; /* Add spacing below header */
}

h1, h2 {
    margin: 0;
}

/* Main Tabs */
.main-tabs {
    display: flex;
    width: 100%;
    margin-bottom: 1rem; /* Add spacing below main tabs */
}

.main-tabs button {
    flex: 1;
    padding: 1rem;
    border: none;
    background-color: #eee;
    cursor: pointer;
    font-size: 1.1rem; /* Make text larger */
}

.main-tabs button.active {
    background-color: #ddd;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 1rem;
}

.content-section.active {
    display: block;
}

/* Day Tabs */
#day-tabs {
    display: flex;
    overflow-x: auto;
    width: 100%;
    margin-bottom: 1rem; /* Add spacing below day tabs */
}

#day-tabs button {
    padding: 0.7rem 1rem; /* Adjust padding */
    border: none;
    background-color: #eee;
    flex-shrink: 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 1rem; /* Make text larger */
    margin-right: 0.5rem;
    border-radius: 5px 5px 0 0; /* Rounded top corners */
}

#day-tabs button.active {
    border-bottom-color: #3498db;
    background-color: #ddd; /* Make active tab a bit darker */
}

/* Exercise Lists */
ul {
    list-style: none;
    padding: 0;
}

li {
    background-color: #fff;
    border: 1px solid #ccc;
    margin-bottom: 0.7rem; /* Increase margin */
    padding: 0.7rem; /* Increase padding */
    border-radius: 5px;
}


.exercise-details label {
    font-weight: bold;
    margin-bottom: -0.75em;
    font-size: 1rem;
}

.exercise-details input {
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 0.5rem;
    margin-bottom: 0;
    width: 20em;
}

input.short {
    width: 5em;
}

.exercise-details input:focus {
    outline: none;
    border-color: #3498db;
}

.exercise-details.editable {
    display: flex;
    flex-direction: column;
}

/* Exercise Data */
.exercise-data {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1.1rem;
    padding-bottom: 0.5rem;
    flex-direction: column; /* Stack name, reps, and weight */
}

.exercise-data span {
    display: block;
    padding-bottom: 0.2rem;
}

.exercise-reps-weight {
    font-size: 0.9rem; /* Slightly smaller for reps/weight */
}

/* Button */
button {
    padding: 0.7rem 1.2rem;
    font-size: 1rem;
    border-radius: 5px;
    margin-right: 0.5rem;
    display: flex; /* Add flex display */
    align-items: center; /* Center items vertically */
    gap: 0.3rem; /* Add spacing between icon and text */
}

/* Icon Buttons */
button svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 0.1rem; /* Adjust stroke width */
}

.remove-button {
    background-color: #ff6347;
    color: #fff;
    border: none;
    cursor: pointer;
}

.save-button{
    background-color: #3498db;
    color: #fff;
    border: none;
    cursor: pointer;
}

.edit-button, .cancel-button{
    background-color: #777;
    color: #fff;
    border: none;
    cursor: pointer;
}

#add-exercise-container {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
    width: auto;
    background-color: transparent;
    padding: 0;
}

#add-exercise {
    background-color: #3498db;
    color: #fff;
    width: auto;
    padding: 0.7rem 1.2rem;
}

.import-export-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

.import-export-buttons button {
    background-color: #4CAF50; /* Green */
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
}

#update-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffcc00;
    color: #000;
    padding: 10px;
    text-align: center;
    z-index: 1000;
}

.exercise-name {
    font-weight: bold;
}

.flex-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
}

.flex-row-baseline {
    display: flex;
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
}

.flex-row-center {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;;
}

.flex-column {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    justify-content: center;
}

.flex-gap {
    gap: 10px;
}
