*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-size: 12px;
    font-family: sans-serif;
    margin: 0;
    color: #333;
}

.container {
    margin: 0 auto;
    background-color: #fefefe;
    padding: 18px min(5%, 48px);
}

hr {
    border: none;
    /* border-top: 1px solid #eee; */
    margin: 3px 8px;
}

.form-group {
    margin-bottom: 0.6em;
}

.form-group-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 0.6em;
}

.form-group-row > .form-group {
    flex: 1;
    margin-bottom: 0;
}


label {
    font-size: 1.15em;
    color: #666;
}

input[type="text"],
input[type="number"],
input[type="time"],
select {
    width: 100%;
    padding: 0.45em;
    border: 1px solid #ccc;
    background: none;
    background-color: #fff;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input:focus, select:focus {
    outline: none;
}

input[type="number"] {
    appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


.time-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}
.time-inputs input[type="time"] {
    flex: 1;
}

.course-row .form-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px; 
}

.course-row .form-group > select,
.course-row .form-group > input[type="number"] {
    flex: 1;
}

.radio-group label,
.checkbox-group label {
    margin-right: 12px;
    display: inline-flex; 
    align-items: center;
    white-space: nowrap;
}
.checkbox-group label {
    line-height: 1.1;
}
.radio-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
    margin-right: 5px;
    width: 1.8em;
    height: 1.8em;
    accent-color: #007bff;
    outline: #333;
    cursor: pointer;
}

.checkbox-group {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

button {
    border: none;
    border-radius: 6px;
    padding: 12px 0;
    font-size: 1.25em;
    cursor: pointer;
    transition: color, background-color 0.2s ease-in-out;
}

#startTime,
#endTime {
    text-align: center;
    text-align-last: center;
    text-align: -webkit-center;
}

#addCourseBtn {
    color: #007bff;
}

#resetBtn {
    color: #c00;
}

.outline-btn {
    width: 100%;
    display: block;
    margin: 6px 0;
    background: none;
    cursor: pointer;
}

.results-area {
    margin-bottom: 10px;
    display: flex;
    gap: 6px;
}

.result-item {
    flex: 1 1 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin: 0;
    padding: 12px 0;
    font-weight: bold;
    font-size: 1.25em;
    text-align: center;
}

.message-area {
    color: #c00;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 1em;
    line-height: 1.6;
}
.message-area p {
    margin: 0;
    padding: 0;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-type {
    min-width: 150px;
}

.discount-box {
    position: relative;
    max-width: 200px;
    width: 30%;
}

.discount-label {
    position: absolute;
    top: -0.5em;
    left: 10px;
    background: #fff;
    color: #888;
    font-size: 0.8em;
    padding: 0 2px;
    pointer-events: none;
    line-height: 1;
}

input:disabled + label, 
label:has(input:disabled) {
    border: #ccc !important;
    color: #aaa !important;
}

.no-selected {
    color: #aaa;
}

.input-error {
    border-color: #c00 !important
}