* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-family: 'MS Serif', 'New York', serif;
}

input[type=file]:invalid {
    border: 2px dashed red;
}

input[type="file"], input[type=radio]:valid {
    border: 2px solid black;
}

html, body {
    height: 100%;
}

body {
    line-height: 1.5;
    background-color: #F1F3F6;
    color: #34495E;
    overflow-y: scroll;
}

nav, main, footer {
    padding: 2px calc((100% - 1100px) / 2) 0;
}

header {
    padding-top: 10px;
    padding-bottom: 10px;
}

main {
    margin-top: 54px;
    margin-bottom: 54px;
    min-height: calc(100vh - 345px);
    overflow: auto;
}

h1 a {
    font-size: 36px;
    font-weight: bold;
    background-image: url("/static/talkliketv_icon.svg");
    background-repeat: no-repeat;
    background-position: 0px 0px;
    height: 36px;
    padding-left: 50px;
    position: relative;
}

h1 a:hover {
    text-decoration: none;
    color: #34495E;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    color: #4EB722;
    text-decoration: underline;
}

textarea, input:not([type="submit"]) {
    font-size: 18px;
    font-family: 'MS Serif', 'New York', serif;
}

header {
    border-top: 5px solid #3498db;
    background-size: 100% 6px;
    background-repeat: no-repeat;
    /*border-bottom: 1px solid #E4E5E7;*/
    overflow: auto;
    /*padding-top: 33px;*/
    /*padding-bottom: 27px;*/
    text-align: center;
}

header a {
    color: #34495E;
    text-decoration: none;
}

nav {
    border-bottom: 1px solid #E4E5E7;
    padding-top: 17px;
    padding-bottom: 15px;
    background: #F7F9FA;
    height: 60px;
    color: #6A6C6F;
}

nav a {
    margin-right: 1em;
    display: inline-block;
}

nav form {
    display: inline-block;
    margin-left: 1.5em;
}

nav div {
    width: 50%;
    float: left;
}

nav div:last-child {
    text-align: right;
}

nav a.live {
    color: #34495E;
    cursor: default;
}

nav a.live:hover {
    text-decoration: none;
}

nav a.live:after {
    content: '';
    display: block;
    position: relative;
    left: calc(50% - 7px);
    top: 9px;
    width: 14px;
    height: 14px;
    background: #F7F9FA;
    border-left: 1px solid #E4E5E7;
    border-bottom: 1px solid #E4E5E7;
    -moz-transform: rotate(45deg);
    -webkit-transform: rotate(-45deg);
}

form input[type="radio"] {
    margin-left: 8px;
    transform: scale(0.85);
}

form input[type="text"], form input[type="password"], form input[type="email"], form textarea  {
    color: #6A6C6F;
    background: #FFFFFF !important;
    border-width: 1px;
    border-style: solid;
    border-radius: 2px;
    padding: 0.2em 0.2em 0.2em 0.5em;
}

#keyword-input {
    width: 13em;
}

form label {
    display: inline-block;
    margin-bottom: 9px;
}

.error {
    color: #C0392B;
    font-weight: bold;
    display: block;
}

.error + textarea, .error + input {
    border-color: #C0392B !important;
    border-width: 2px !important;
}

textarea {
    resize: vertical;
    height: 80px;
    max-height: 100px;
    padding: 8px;
    width: 100%;
    color: #FFFFFF;
    background-color: #FFFFFF; !important;
}

button {
    background: none;
    padding: 0;
    border: none;
    color: #3498db;
    text-decoration: none;
}

button:hover {
    color: #4EB722;
    text-decoration: underline;
    cursor: pointer;
}

div.flash {
    color: #FFFFFF;
    font-weight: bold;
    background-color: #34495E;
    padding: 18px;
    margin-bottom: 36px;
    text-align: center;
}

div.error {
    color: #FFFFFF;
    background-color: #C0392B;
    padding: 18px;
    margin-bottom: 36px;
    font-weight: bold;
    text-align: center;
}

table {
    background: white;
    border: 1px solid #E4E5E7;
    border-collapse: collapse;
    width: 100%;
}

footer {
    border-top: 1px solid #E4E5E7;
    padding-top: 17px;
    padding-bottom: 15px;
    background: #F7F9FA;
    height: 60px;
    color: #6A6C6F;
    text-align: center;
}

select {
    margin-bottom: 10px;
    margin-top: 10px;
    outline: 0;
    padding: 5px;
    border-radius: 4px;
}

p {
    display: block;
    margin-bottom: 12px;
    font-family: 'MS Serif', 'New York', serif;
}

li {
    margin-bottom: 12px;
    font-family: 'MS Serif', 'New York', serif;
}

ul {
    list-style-type: disc;
    margin-left:14px;
}

li.ul-li {
    margin-bottom: 2px;
}

.navigation-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.play_sound {
    cursor: default;
}

.smaller-heading {
    font-size: 24px;
}

.float-right {
    float: right;
}

.form-group {
    margin-bottom: 15px; /* Adds margin between form groups */
}

.short-input {
    width: 200px;
}

.voice-label {
    font-weight: 500;
    margin-right: 5px;
}

.three-columns {
    column-count: 3;
}

.two-columns {
    column-count: 2;
}

.upload-form {
    display: flex;
    flex-direction: column;
    margin-top: 5px; /* Adds a small gap between the form and the upload button */
}

.upload-form .form-group {
    margin-bottom: 10px; /* Adds a small gap between form groups */
}

.upload-form .btn {
    width: 100px; /* Makes the upload button shorter */
}

.play_sound {
    cursor: default;
}

.smaller-heading {
    font-size: 24px;
}

.float-right {
    float: right;
}

.form-group {
    margin-bottom: 15px; /* Adds margin between form groups */
}

.short-input {
    width: 200px;
}

.kofi-button-container {
    text-align: right;
    margin: 10px 0;
}

/* Fullscreen orientation alert styling */
#orientation-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 90%;
    height: 90%;
    max-width: none;
    margin: auto;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 3rem; /* Increased from 1.5rem */
    padding: 2rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

#orientation-alert strong {
    font-size: 3rem; /* Increased from 2rem */
    margin-bottom: 1.5rem;
    display: block;
}

#orientation-alert .btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem; /* Slightly larger close button */
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.spinner-container p {
    color: #000000; /* Ensuring text is black */
    font-weight: 500; /* Making it slightly bolder for better readability */
}

.alert-info {
    --bs-alert-bg: rgb(214.4, 234.4, 247.8);
}

.kofi-button-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.bad-bunny-button {
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.2);
    line-height: 36px !important;
    min-width: 150px;
    display: inline-block !important;
    background-color: #3498db;
    padding: 2px 12px !important;
    text-align: center !important;
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    overflow-wrap: break-word;
    vertical-align: middle;
    border: 0 none #fff !important;
    font-family: 'Quicksand', Helvetica, Century Gothic, sans-serif !important;
    text-decoration: none;
    text-shadow: none;
    font-weight: 700 !important;
    font-size: 14px !important;
}

.bad-bunny-button:hover {
    background-color: #2980b9;
    color: white !important;
    text-decoration: none;
}

/* Global Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-spinner-container {
    text-align: center;
    color: white;
}

.loading-spinner-container .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

.loading-spinner-container p {
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Hide invalid feedback by default */
.invalid-feedback {
    display: none;
}

/* Show invalid feedback when field is invalid and has been interacted with */
.form-control.is-invalid ~ .invalid-feedback,
.form-control:invalid.was-validated ~ .invalid-feedback {
    display: block;
}

/* Red border for invalid fields */
.form-control.is-invalid,
.form-control:invalid.was-validated {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Green border for valid fields that have been interacted with */
.form-control.is-valid,
.form-control:valid.was-validated:not([value=""]):not(:placeholder-shown) {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}