.elementor-kit-5{--e-global-color-primary:#011B27;--e-global-color-secondary:#3D4543;--e-global-color-text:#011B27;--e-global-color-accent:#FFA400;--e-global-color-a79bb49:#6EC4E6;--e-global-color-7449858:#8ED8F2;--e-global-color-48b6ad2:#FFFFFF;--e-global-color-473fcd4:#1E90FF;--e-global-color-7de0728:#F39E9A;--e-global-color-04ca80c:#F8FDFF;--e-global-color-f7a2031:#073A52;--e-global-color-08947bf:#011B27;--e-global-color-b173189:#A7DFFC;--e-global-color-59c92fc:#9BD7F7;--e-global-color-a212ac9:#86C5E6;--e-global-color-8f6a70e:#242F3D;--e-global-typography-primary-font-family:"Roboto";--e-global-typography-primary-font-weight:700;--e-global-typography-secondary-font-family:"Roboto";--e-global-typography-secondary-font-weight:400;--e-global-typography-text-font-family:"Roboto";--e-global-typography-text-font-weight:400;--e-global-typography-accent-font-family:"Roboto";--e-global-typography-accent-font-weight:500;color:var( --e-global-color-08947bf );font-family:"Roboto", Sans-serif;}.elementor-kit-5 e-page-transition{background-color:#FFBC7D;}.site-header{background-color:#FFFFFF;padding-inline-end:6px;padding-inline-start:6px;}.elementor-kit-5 a{color:#0000FF;}.elementor-kit-5 a:hover{color:#1E90FF;}.elementor-kit-5 h1{color:#6BC4E8;font-family:var( --e-global-typography-primary-font-family ), Sans-serif;font-weight:var( --e-global-typography-primary-font-weight );}.elementor-section.elementor-section-boxed > .elementor-container{max-width:1140px;}.e-con{--container-max-width:1140px;}.elementor-widget:not(:last-child){margin-block-end:20px;}.elementor-element{--widgets-spacing:20px 20px;--widgets-spacing-row:20px;--widgets-spacing-column:20px;}{}h1.entry-title{display:var(--page-title-display);}.site-header .header-inner{width:1034px;max-width:100%;}.site-header .site-branding .site-logo img{width:259px;max-width:259px;}.site-header .site-navigation ul.menu li a{color:#3D4D63;}.site-header .site-navigation-toggle .site-navigation-toggle-icon{color:#6AC5EC;}.site-header .site-navigation .menu li{font-family:"Poppins", Sans-serif;font-weight:600;}.site-footer .site-branding{flex-direction:column;align-items:stretch;}@media(max-width:1024px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:1024px;}.e-con{--container-max-width:1024px;}}@media(max-width:767px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:767px;}.e-con{--container-max-width:767px;}}/* Start custom CSS *//* Applet related CSS */
:root {
    --button-save-image: url('https://media.brainiest.ai/saveButton-duotone.svg');
    --button-restore-image: url('https://media.brainiest.ai/restoreButton-duotone.svg');
    --button-reset-image: url('https://media.brainiest.ai/removeButton-duotone.svg');
    --button-download-image: url('https://media.brainiest.ai/downloadButton-duotone.svg');
    --button-upload-image: url('https://media.brainiest.ai/uploadButton-duotone.svg');
    --button-copy-image: url('https://media.brainiest.ai/copyButton-duotone.svg');
    --button-exchange-image: url('https://media.brainiest.ai/exchangeButton-duotone.svg');
    --button-refresh-image: url('https://media.brainiest.ai/refreshButton-duotone.svg');
    --toggle-off-image: url('https://media.brainiest.ai/Toggle-button-off.svg');
    --toggle-on-image: url('https://media.brainiest.ai/Toggle-button-on.svg');
    --button-download-svg: url('https://media.brainiest.ai/downloadSvgButton-duotone.svg');
    --button-download-video: url('https://media.brainiest.ai/downloadVideo-duotone.svg');
    --button-save-word: url('https://staging.brainiest.ai/wp-content/uploads/2025/05/downloadDoc-duotone.svg');
    --button-save-pdf: url('https://staging.brainiest.ai/wp-content/uploads/2025/05/downloadPDF-dutone.svg');
    --brainiest-blue: #6BC4E8;
    --brainiest-orange: #FFA400;
    --brainiest-black: #3D4543;
    --pupperoni-pink: #f39E9A;
    --pup-tide-mist: #F8FDFF;
    --brainiest-blue: #6BC4E8;
    --navy-drool: #073A52;
    --the-barkside: #011B27;
    --puppy-pool-light: #A7DFFC;
    --puppy-pool-medium: #9BD7F7;
    --puppy-pool-dark: #86c5e6;
    --pupperoni-pink: #f39e9a;
}

/* Navigation Styles */
.nav-secondary {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 150%;
    color: var(--the-barkside);
}
.nav-description {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    color: var(--the-barkside);
}

/* Footer styles */
.footer-text {
    font-family: 'Roboto', sans-serif;
    font-weight: regular;
    font-size: 14px;
    line-height: 150%;
    color: var(--the-barkside);
}
.bai_footer a {
    color: white;
    margin-left: 15px;
    text-decoration: underline;
}
.bai_footer a:hover {
    color: var(--brainiest-blue);
}
#desktop-footer-divider {
        display: block;
    }
    #mobile-footer-divider {
        display: none;
    }
@media (max-width: 1023px) {
    .bai_footer a {
        display:block;
        margin-bottom: 10px;
    }
    #desktop-footer-divider {
        display: none;
    }
    #desktop-divider-div {
        display: none;
    }
    #mobile-footer-divider {
        display: block;
    }
}

/* Stick footer to bottom - Elementor compatible */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for better mobile support */
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Target Elementor's main page structure */
.elementor-page {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Target the main content area (everything between header and footer) */
.elementor-page > .elementor:not(.elementor-location-header):not(.elementor-location-footer) {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Target Elementor containers in the main content */
.elementor-page > .elementor:not(.elementor-location-header):not(.elementor-location-footer) [data-element_type="container"] {
    flex: 0 0 auto; /* Use natural height */
}

/* Make the last container before footer expand to fill space */
.elementor-page > .elementor:not(.elementor-location-header):not(.elementor-location-footer) [data-element_type="container"]:last-of-type {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.elementor-page > .elementor:not(.elementor-location-header):not(.elementor-location-footer) [data-element_type="container"]:last-of-type .e-con-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Keep content at top */
}

/* Footer positioning */
.elementor-location-footer {
    margin-top: auto;
    flex-shrink: 0; /* Prevent footer from shrinking */
}

/* Fallback for older browsers that don't support dvh */
@supports not (height: 100dvh) {
    body {
        min-height: 100vh;
    }
}

/* Ensure content can scroll if needed */
.elementor-section-wrap {
    overflow-y: auto;
    min-height: 0;
}

/* Body Styles */

h1 {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 900;
    font-size: 70px;
    line-height: 90%;
    color: var(--the-barkside);
    text-transform: uppercase;
}
h2 {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 900;
    font-size: 48px;
    line-height: 90%;
    color: var(--the-barkside);
    text-transform: uppercase;
}
.h2-secondary {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 900;
    font-size: 20px;
    line-height: 90%;
    color: var(--the-barkside);
    text-transform: uppercase;
}
h3 {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 900;
    font-size: 28px;
    line-height: 90%;
    color: var(--the-barkside);
    text-transform: uppercase;
}
h4 {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: bold;
    font-size: 28px;
    line-height: 130%;
    color: var(--the-barkside);
}
.nav-primary {
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    font-size: 18px;
    line-height: 150%;
    color: var(--the-barkside);
}
.nav-secondary {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 150%;
    color: var(--the-barkside);
}
.nav-descriptions {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    color: var(--the-barkside);
}
.body-small {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 150%;
    color: var(--the-barkside);
}
.body-small-bold {
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    font-size: 18px;
    line-height: 150%;
    color: var(--the-barkside);
}
.body-regular {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 150%;
    color: var(--the-barkside);
}
.body-regular-bold {
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    font-size: 20px;
    line-height: 90%;
    color: var(--the-barkside);
}
.body-large {
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    font-size: 28px;
    line-height: 130%;
    color: var(--the-barkside);
}
.quote {
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    font-style: italic;
    font-size: 28px;
    line-height: 140%;
    color: var(--the-barkside);
}

/* Lightbox */
.lightbox-hover {
  position: relative;
}
.lightbox-hover:hover::after {
  content: '+'; /* Or another symbol */
  font-size: 50px;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animate public menu */
.pushdown-animate { transition: padding-top .18s ease; }


/* Header spacer */
.bai-menu-spacer { height:0; pointer-events:none; display:block; line-height:0; }



/* Authenticated Pages */

.target-form {
    margin-top: 25px;
}

/* Reset Elementor style */
button {
    border: none;
}

button:focus, button:active {
    background-color: lightcyan;
}

/* Blog Styles */
.read-time, .blog-date {
    font-family: "Roboto", Sans-Serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 150%;
}

.alert-btn-primary:focus, .alert-btn-primary:active {
    background-color: #007bff;
}

/* Applet Features Section*/
.applet-features h1, .applet-features h2 {
    margin-top: 50px;
    margin-bottom: 20px;
    font-weight: 900 !important;
}
.applet-features img:first-child {
    border: 6px solid var(--the-barkside);
    border-radius: 12px
}
.applet-benefits {
    font-size: 22px;
    margin-top: 20px;
}
.applet-features ul {
    background-color: transparent;
}
.applet-features li {
    background-color: transparent;
}

@media (max-width: 767px) {
    .applet-benefits {
    font-size: 18px;
    }
    .applet-features img:first-child {
        float: none;
        width: 100%;
        margin: auto;
    }
    .applet-features h1, .applet-features h2 {
    font-size: 47px !important;
}
}

/* Tooltips */
.tippy-box[data-theme~='brainiest'] {
    background-color: var(--the-barkside);
    color: white;
    border-radius: 10px;
    padding: 5px;
}

.tippy-box[data-theme~='brainiest'][data-placement^='top']>.tippy-arrow::before {
    border-top-color: var(--the-barkside);
}

.tippy-box[data-theme~='brainiest'][data-placement^='bottom']>.tippy-arrow::before {
    border-bottom-color: var(--the-barkside);
}

.tippy-box[data-theme~='brainiest'][data-placement^='left']>.tippy-arrow::before {
    border-left-color: var(--the-barkside);
}

.tippy-box[data-theme~='brainiest'][data-placement^='right']>.tippy-arrow::before {
    border-right-color: var(--the-barkside);
}

.keyboardInstructions {
    position: absolute;
    top: -25px;
    right: 5px;
    font-size: 1.2em;
    color: var(--brainiest-blue);
    cursor: help;
    z-index: 10;
}

.keyboardInstructions i {
    padding: 5px;
}

label {
    cursor: help;
}

.next-link:hover,
.back-link:hover {
    background-color: lightcyan;
}

.next-link:focus,
.back-link:focus {
    background-color: white;
    color: #003d7a;
}

/* Screen reader labels */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.sr-only-focusable:active,
    .sr-only-focusable:focus {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        white-space: normal;
        
}

.visually-hidden:not(:focus):not(:active) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Make it visible when focused */
.visually-hidden:focus,
.visually-hidden:active {
    position: fixed;
    /* or static if inside flow */
    top: 20%;
    right: 10px;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.5em 1em;
    clip: auto;
    white-space: normal;
    background: #f0f8ff;
    color: #333;
    border: 2px solid var(--brainiest-blue);
    border-radius: 6px;
    z-index: 1002;
    font-size: 14px;
}

.fully-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
    visibility: hidden;
}

#quicktips-accessible-trigger:focus {
    position: fixed;
    top: 20%;
    left: 10px;
    width: 20%;
    background: #f0f8ff;
    color: #333;
    border: 2px solid var(--brainiest-blue);
    border-radius: 6px;
}

#saved-conversations-accessible-trigger:focus {
    position: fixed;
    top: calc(50% - 150px);;
    right: 10px;
    /* additional styles… */
}

#suggested-topics-accessible-trigger:focus {
    position: fixed;
    top: calc(50% + 75px);
    right: 10px;
    /* additional styles… */
}

/* Elementor containers */
div.elementor-widget-container {
    padding: 0;
}

/* Media Library */
/* Overall media modal */
.media-modal-content {
    background-color: #f9f9f9;
    font-family: 'Open Sans', sans-serif;
    border-radius: 12px;
}

.media-modal-close {
    color: black;
    border: 1px solid black;
}

.media-modal-close:hover {
    background-color: var(--brainiest-orange);
    border: none;
}

.media-frame-router {
    margin-top: 30px;
}

.media-router .media-menu-item.active:last-child {
    border: 2px solid black;
}

.button-link.delete-attachment:hover {
    text-decoration: underline;
    background-color: white;
}

label.media-search-input-label,
#media-search-input {
    display: none;
}

#media-attachment-date-filters {
    width: 300px;
}

#menu-item-upload,
#menu-item-browse {
    color: var(--brainiest-black);
    background: white;
}

#menu-item-browse:hover,
#menu-item-upload:hover {
    color: white;
    background: var(--brainiest-blue);
}

#menu-item-browse:active,
#menu-item-upload:active {
    color: var(--brainiest-black);
    background-color: white;
    font-weight: bold;
    border: 2px solid black;
}

/* Title Bar */
.media-frame-title h1 {
    font-size: 22px;
    color: #333;
    margin-top: 0;
}

/* Toolbar (Search + Filters) */
.media-toolbar-primary {
    background: #ffffff;
    border-bottom: 1px solid #ddd;
}

.media-toolbar-secondary {
    background: #ffffff;
}

.media-toolbar button.button {
    background-color: #6BC4E8;
    /* Brand Blue */
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
}

.media-toolbar button.button:hover {
    background-color: #FFA400;
    /* Brand Orange on hover */
}

/* Thumbnail grid */
.attachments {
    background-color: #f0f6ff;
    /* Soft light blue */
    padding: 12px;
    border-radius: 8px;
}

/* Each image tile */
.attachment {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.attachment:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Sidebar panel (attachment details) */
.media-sidebar {
    background-color: #ffffff;
    border-left: 1px solid #ddd;
    padding: 16px;
    border-radius: 0 12px 12px 0;
}

/* 'Use this image' button */
.media-button-select {
    background-color: #6BC4E8;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
}

.media-button-select:hover {
    background-color: #FFA400;
}

/* Focus and active states */
.media-frame-content input:focus,
.media-frame-content textarea:focus {
    border-color: #6BC4E8;
    box-shadow: 0 0 0 1px #6BC4E8;
}

/* Smooth ML modal fade-in */
@keyframes fadeInModal {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* When media modal opens, apply fadeIn */
.media-modal {
    opacity: 0;
    transform: scale(0.95);
    animation: fadeInModal 0.4s ease-out forwards;
}

@keyframes fadeOutModal {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

body.modal-open #wpcontent,
body.modal-open #adminmenuwrap {
    filter: blur(4px);
    transition: filter 0.4s ease;
}


/* Text File Upload Links */
.saved-file-info {
    margin: 10px 0;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.remove-saved-file {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    font-size: 16px;
    margin-left: auto;
}

.remove-saved-file:hover {
    background: #cc0000;
}

/* End Text File Upload Links */

.attachment-info .edit-attachment {
    display: none !important;
}

/* Applet Description Pages */
.applet_description {
    font-family: 'Roboto', Sans-Serif;
    font-weight: 600;
    font-size: .9rem;
    color: #242F3D !important;
    line-height: 1.6;
}

/* Toggle button */
.toggle .off-state {
    content: var(--toggle-off-image);
}

.toggle .on-state {
    content: var(--toggle-on-image);
}

.elementor-widget-form .elementor-field-group>label {
    color: black;
}

.appletPage {
    margin-top: 20px;
    margin-bottom: 50px;
    font-family: 'Roboto', Sans-Serif;
}

.appletHeader h1 {
    font-family: 'Roboto Flex', Sans-Serif;
    text-align: center;
    margin-bottom: 20px;
    color: var(--the-barkside);
    font-size: 2.5rem;
    font-weight: 700 !important;
    text-transform: capitalize;
}
.dark-mode .appletHeader h1 {
    color: white !important;
}

.dark-mode .media-search-input {
    background-color: white;
    border-color: #444;
    color: black;
}

.dark-mode .media-search-input::placeholder {
    color: black;
}

.form-instructions {
    margin-bottom: 20px;
}

.elementor-kit-2054 p {
    margin-bottom: 0;
}

button:active,
button:focus {
    outline: none;
    background-color: lightcyan;
}

.form_section_heading {
    font-size: 1.2em;
    font-weight: 600;
    color: black;
    margin-bottom: 0;
    margin-top: 20px;
}

div.form_section_description {
    font-weight: 400;
}

div.form_section_description p:last-child {
    margin-bottom: 0;
}

.form-instructions {
    font-family: 'Roboto', Sans-Serif;
    font-weight: 400;
    line-height: 1.8;
    color: black;
}

.form-instructions p {
    margin-bottom: 20px;
    color: black;
}

.form-instructions ul {
    font-weight: 400;
    color: black;
}

.form-instructions p:last-child {
    margin-bottom: 0;
}

label {
    font-weight: 500;
    margin: 1rem 0 0.5rem 0;
    color: black;
}

input[type=text],
input[type=number],
input[type=url],
input[type=date],
input[type=time],
input[type=email],
select,
textarea,
.wp-playlist-light {
    border: thin solid gray;
    border-radius: 30px;
    font-size: 16px;
    font-family: 'Roboto', Sans-Serif;
    font-weight: 400;
}

input[type=checkbox],
input[type=radio] {
    accent-color: var(--brainiest-blue);
}

input[type=number]:invalid {
    border: 3px solid red;
}

input#upload_image::file-.elementor-kit-5-button {
    border: thin solid gray;
    border-radius: 3px;
    padding: 1rem;
}

::placeholder {
    font-weight: 400;
    color: dimgray;
}

fieldset {
    border: thin solid gray;
    border-radius: 20px;
}

select {
    height: 42px;
    border: thin solid gray;
    border-radius: 30px;
}

#output_format {
    width: 150px;
}

.submit_button,
.generate_image,
.populateForm,
.selectFromMediaLibrary {
    background-color: var(--brainiest-blue);
    color: var(--the-barkside);
    border: none;
    border-radius: 30px;
    font-weight: bold;
    padding: 0.5rem 1rem;
    margin: 15px 0 15px 0;
    cursor: pointer;
    filter: none;
}

.selectFromMediaLibrary {
    margin-top: -15px;
    filter: drop-shadow(1px 2px 3px black);
}

.submit_button,
.generate_image {
    filter: drop-shadow(1px 2px 3px black);
}

.submit_button:hover,
.generate_image:hover,
.populateForm:hover,
.selectFromMediaLibrary:hover,
.selectFromMediaLibrary:focus,
.submit_button:focus {
    background-color: dodgerblue;
    border: none;
    color: white;
}

.submit_button:active {
    background-color: lightsteelblue;
    cursor: wait;
}

.submit_button:disabled,
.regenerate-button:disabled,
.generate_image:disabled,
.upload_image_btn:disabled {
    background-color: gray;
    cursor: wait;
}

.upload_image_btn {
    background-color: #68C4E8;
    padding: 0.5em 1em 0.5em 1em;
    font-weight: bold;
    border-radius: 30px;
}

.upload_image_btn:hover {
    background-color: dodgerblue;
}

.button_row {
    display: flex;
    justify-content: space-between;
    flex-direction: row-reverse;
    margin-top: 15px;
    margin-bottom: 20px;
}

.button_row2 {
    display: flex;
    align-items: center;
}

#submitBtn+#upload-button+#downloadBtn {
    margin-left: 20px;
}

.save-button:hover,
.restore-button:hover,
.copyButton:hover,
.switch-content-button:hover,
.voiceButton:hover,
.clear-form-button:hover,
.downloadBtn:hover,
.refreshButton:hover,
.upload-button:hover {
    background-color: lightcyan;
}

.save-button:active,
.restore-button:active,
.copyButton:active,
.switch-content-button:active,
.voiceButton:active,
.clear-form-button:active,
.downloadBtn:active,
.refreshButton:active,
.upload-button:active {
    background-color: lightcyan;
}

.populateFieldset {
    width: 48%;
    margin-left: auto;
    margin-bottom: 15px;
    margin-top: 15px
}

.populateForm {
    background-color: #68C4E8;
    border-radius: 30px
}

.populateForm:hover {
    background-color: dodgerblue;
}

.reg_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.regenerate-button,
.regenerate-btn {
    background-color: var(--brainiest-blue);
    padding: 0.5rem 1rem;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 20px;
    color: var(--brainiest-black);
    border: none;
    font-weight: bold;
    border-radius: 30px;
}

.regenerate-button:hover,
.regenerate-btn:hover {
    background-color: dodgerblue;
}

#switch-content-button {
    border: none;
    padding: 0;
    margin-right: auto;
    display: none;
}

.copyButton {
    border: none;
    padding: 0;
    margin-right: 20px;
}

.loader_animation {
    display: none;
}

.upload_animation {
    display: none;
}

.reg_row {
    margin-top: 20px;
}

#bai-content-container {
    font-family: 'Aptos', 'Arial', 'Helvetica', sans-serif;
    border: none;
    margin-top: 10px;
}

#bai-content-container h1 {
    font-family: 'Aptos', 'Arial', 'Helvetica', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: none;
    color: var(--navy-drool);
}

#bai-content-container h2 {
    font-family: 'Aptos', 'Arial', 'Helvetica', sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
    text-transform: none;
}

#bai-content-container h3 {
    font-family: 'Aptos', 'Arial', 'Helvetica', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: none;
}

#bai-content-container button {
    margin-bottom: 20px;
    margin-left: 20px;
}

.bai-content-item {
    display: none;
    background: ghostwhite;
    padding: 20px;
}

.error_message {
    color: red;
}

.style_preset {
    background-color: aliceblue;
}

.required-asterisk {
    color: crimson;
    margin-left: .1em;
}

.success-div {
    font-size: 16px;
    font-weight: normal;
    color: black;
    margin-bottom: 0;
    display: none;
}

.success-div p {
    margin-bottom: 20px;
}

/*
.success-div p:last-child {
    margin-bottom: 0;
}
*/

.saveButtons {
    background-image: var(--button-save-image);
    /* Ensure the text content is hidden if you have any */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    margin: 5px 0 0 10px;
    background-size: cover;
    width: 45px;
    height: 45px;
}

.saveWordButtons {
    background-image: var(--button-save-word);
    /* Ensure the text content is hidden if you have any */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    margin: 5px 10px 0 10px;
    background-repeat: no-repeat;
    width: 45px;
    height: 45px;
}
.saveWordButtons:hover {
    background-color: lightcyan;
}

.savePdfButtons {
    background-image: var(--button-save-pdf);
    /* Ensure the text content is hidden */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    margin: 5px 10px 0 10px;
    width: 45px;
    height: 45px;
    background-repeat: no-repeat;
}
.savePdfButtons:hover {
    background-color: lightcyan;
}

.restoreButtons {
    background-image: var(--button-restore-image);
    /* Ensure the text content is hidden if you have any */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    background-size: cover;
    margin: 5px 0 0 10px;
    width: 45px;
    height: 45px;
}

.resetButtons {
    background-image: var(--button-reset-image);
    /* Ensure the text content is hidden if you have any */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    margin: 5px 0 0 10px;
    background-size: cover;
    width: 45px;
    height: 45px;
}

.downloadButtons {
    background-image: var(--button-download-image);
    /* Ensure the text content is hidden if you have any */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    margin: 5px 0 0 10px;
    background-size: cover;
    width: 45px;
    height: 45px;
}

.uploadButtons {
    background-image: var(--button-upload-image);
    /* Ensure the text content is hidden if you have any */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    margin-top: 5px;
    margin-left: auto;
    background-size: cover;
    width: 45px;
    height: 45px;
}

.copyButtons {
    background-image: var(--button-copy-image);
    /* Ensure the text content is hidden if you have any */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    margin-right: 10px;
    margin-left: 0;
    background-size: cover;
    width: 45px;
    height: 45px;
}

.exchangeButtons {
    background-image: var(--button-exchange-image);
    /* Ensure the text content is hidden if you have any */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    background-size: cover;
    width: 45px;
    height: 45px;
}

/* When exchange button is loaded, pulkse once */
@keyframes pulseHighlight {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pulse-once {
    animation: pulseHighlight 0.6s ease-in-out 1;
    /* 1 iteration only */
}

.refreshButtons {
    background-image: var(--button-refresh-image);
    /* Ensure the text content is hidden if you have any */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    margin-left: auto;
    margin-right: 0;
    background-size: cover;
    width: 45px;
    height: 45px;
}

.downloadVideoSVGButtons {
    background-image: var(--button-download-svg-video);
    /* Ensure the text content is hidden if you have any */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    margin: 5px 10px 10px 0;
    background-size: cover;
    width: 45px;
    height: 45px;
}

.downloadVideoButtons {
    background-image: var(--button-download-video);
    /* Ensure the text content is hidden if you have any */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    margin: 5px 10px 10px 0;
    background-size: cover;
    width: 45px;
    height: 45px;
}

.downloadSVGButtons {
    background-image: var(--button-download-svg);
    /* Ensure the text content is hidden if you have any */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    /* Additional styles to adjust the button appearance */
    border: none;
    margin: 5px 10px 10px 0;
    background-size: cover;
    width: 45px;
    height: 45px;
}

.downloadSVGButtons:hover,
.downloadVideoButtons:hover,
.saveButtons:hover,
.restoreButtons:hover,
.resetButtons:hover,
.downloadButtons:hover,
.uploadButtons:hover,
.copyButtons:hover,
.exchangeButtons:hover,
.refreshButtons:hover {
    background-color: lightcyan;
}

.downloadSVGButtons:focus,
.downloadVideoButtons:focus,
.saveButtons:focus,
.restoreButtons:focus,
.resetButtons:focus,
.downloadButtons:focus,
.uploadButtons:focus,
.copyButtons:focus,
.exchangeButtons:focus,
.refreshButtons:focus {
    background-color: lightcyan;
}

#modelSelectButton {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 160px;
    margin-right: auto;
    margin-left: 40px;
    margin-bottom: 0;
}

.toggleCheckboxButton {
    display: none;
}

.toggleButtonContainer {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: fit-content;
    border: 3px solid var(--brainiest-blue);
    border-radius: 20px;
    background: var(--brainiest-blue);
    font-weight: bold;
    color: var(--brainiest-blue);
    cursor: pointer;
    padding: 0.5rem 0.5rem;
    margin: 15px 0 15px 0;
    filter: drop-shadow(1px 2px 3px black);
}

.toggleButtonContainer::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 100%;
    left: 0%;
    border-radius: 20px;
    background: white;
    transition: all 0.3s;
}

.toggleButtonContainer div {
    padding: 6px;
    text-align: center;
    z-index: 1;
}

.toggleCheckboxButton:checked+.toggleButtonContainer::before {
    left: 50%;
}

.toggleCheckboxButton:checked+.toggleButtonContainer div:first-child {
    color: white;
    transition: color 0.3s;
}

.toggleCheckboxButton:checked+.toggleButtonContainer div:last-child {
    color: #3D4543;
    transition: color 0.3s;
}

.toggleCheckboxButton+.toggleButtonContainer div:first-child {
    color: #3D4543;
    transition: color 0.3s;
}

.toggleCheckboxButton+.toggleButtonContainer div:last-child {
    color: white;
    transition: color 0.3s;
}

.generate_image {
    background-color: #68C4E8;
    margin: 15px 0 15px 0;
    outline: none;
}


/* Drag and Drop CSS */
#drag-drop-area {
    border: 2px dashed #ccc;
    border-radius: 30px;
    background-color: aliceblue;
    width: 50%;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#drag-drop-area p {
    text-align: center;
    max-width: 400px;
}

#drag-drop-area.drag-over {
    background-color: #e9e9e9;
    border-color: #999;
}

#drag-drop-area:hover {
    background-color: #e9e9e9;
}

/* Chatbot additional CSS */
.assistant-message,
.user-message {
    color: black;
}

.drag-drop-area.disabled {
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}

#astroChatBox {
    display: none;
    /* Initial state is hidden */
    opacity: 0;
    /* Ensure opacity starts at 0 */
    transition: opacity 2s ease;
}

#astroChatBox.visible {
    opacity: 1;
}

@media screen and (max-width: 1366px) {
    label {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .button_row {
        flex-wrap: wrap;
        flex-direction: row;
        justify-content: space-between;
    }

    .button_row button {
        padding: 0;
        margin: 8px;
    }

    #generate_image {
        display: block;
        margin-right: 60px;
        margin-left: 60px;
        width: 100%;
        padding: 20px;
    }

    #submitBtn {
        display: block;
        margin-right: 60px;
        margin-left: 60px;
        width: 100%;
        padding: 10px 10px 10px 10px !important;
    }

    #modelSelectButton {
        margin-left: auto;
        margin-right: 0;
    }

    #upload-button {
        margin-right: auto;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    #modelSelectButton {
        margin-left: 10px;
    }
}

@media (max-width: 767px) {
    .appletHeader h1 {
        font-size: 1.5rem;
    }

    .appletPage {
        margin-top: 10px;
        margin-bottom: 20px;
    }

    .tips {
        max-width: 95%;
    }
}


@media only screen and (max-width: 1140px) {
    .elementor-header {
        width: 100vw;
        /* Ensure full viewport width */
    }
}

@media only screen and (min-width: 1141px) {
    .elementor-header {
        width: 100%;
        /* Reset to full width */
    }
}

/* Credit Badge CSS */
.bai-credit-badge {
    background: #f0f4ff;
    border: 1px solid #d0e0ff;
    padding: 12px;
    margin: 0 0 25px 0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.bai-credit-badge strong {
    color: #0a3d91;
}


/* Slide-in Sidebar CSS */
#quicktips-trigger {
    position: fixed;
    top: 20%;
    left: 0;
    width: 100px;
    height: 80%;
    background-color: transparent;
    z-index: 999;
}

/* Add media queries to adjust trigger behavior */
@media screen and (max-width: 1400px) {

    #quicktips-trigger,
    #suggested-topic-trigger,
    #saved-conversations-trigger {
        width: 50px;
        /* Reduce trigger area */
    }
}

@media screen and (max-width: 1200px) {

    #quicktips-trigger,
    #suggested-topic-trigger,
    #saved-conversations-trigger {
        width: 30px;
        /* Further reduce trigger area */
    }

    #sidebar-handle,
    .right-sidebar {
        width: 25px;
        /* Make handle slightly smaller */
    }
}

/* Hide sidebar on very small screens */
@media screen and (max-width: 1000px) {

    #quicktips-trigger,
    #sidebar-handle,
    #quicktips-sidebar,
    #right-sidebar-container {
        display: none;
    }
}

#quicktips-sidebar {
    position: fixed;
    top: 15%;
    left: -600px;
    /* Start off-screen */
    width: 600px;
    height: 80%;
    background-color: #f8f8f8;
    border-radius: 0 30px 30px 0;
    border: 2px solid var(--brainiest-blue);
    box-shadow: -2px 0 5px lightcyan;
    /* rgba(0,0,0,0.1); */
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Changed from 'right' to 'left' */
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    z-index: 1000;
    padding: 20px 20px 20px 40px;
    box-sizing: border-box;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.dark-mode #quicktips-sidebar {
    background-color: #1a1a1a;
    border: 2px solid var(--brainiest-blue);
    box-shadow: -2px 0 5px lightcyan;
}

.dark-mode #quicktips-sidebar h3, .dark-mode #quicktips-sidebar p, .dark-mode #quicktips-sidebar li {
    color: white;
}

.dark-mode #quicktips-sidebar ul {
    color: white;
}

.dark-mode #getExampleDiv, .dark-mode #getAstroDiv {
    background-color: #1a1a1a;
    color: white;
}

#quicktips-sidebar.active {
    left: 0;
}

#quicktips-sidebar h3 {
    margin-top: 0;
}

#quicktips-sidebar ul {
    padding-left: 20px;
}

#quicktips-sidebar li {
    margin-bottom: 10px;
}

#sidebar-handle {
    position: fixed;
    top: 45%;
    left: 0;
    width: 30px;
    height: 200px;
    background-color: #073a52;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    z-index: 1001;
}

#sidebar-handle::after {
    content: "Applet Help";
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#sidebar-handle:hover {
    background-color: var(--pupperoni-pink);
}
#sidebar-handle:hover::after {
    color: var(--the-barkside);
}

#getExampleDiv {
    display: flex;
    justify-content: center;
    margin: 40px;
}

.exampleButton {
    background-color: var(--brainiest-blue);
    color: white;
    border: none;
    border-radius: 30px;
}

.exampleButton:hover {
    background-color: var(--brainiest-orange);
}

#getAstroDiv {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
}

#getAstroDiv p {
    font-size: 50px;
}

#helpToggleP {
    align-self: center;
}

/* Base Astro button style */
#helpToggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--brainiest-blue);
    /* Default brand blue */
    transition:
        color 0.3s ease,
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        /* smooth movement */
        outline 0.3s ease;
}

/* Mouse hover - slightly lift the paw and change color */
#helpToggle:hover {
    color: var(--brainiest-orange);
    transform: translateY(-2px);
    /* gentle hover lift */
}

/* Keyboard focus - orange color + soft outline */
#helpToggle:focus {
    outline: none;
    /* Remove harsh browser default */
}

#helpToggle:focus-visible {
    outline: 2px solid var(--brainiest-orange);
    outline-offset: 4px;
    color: var(--brainiest-orange);
    transform: translateY(-2px);
    /* Same gentle lift as hover */
}

/* Active (mouse down) - small push down */
#helpToggle:active {
    transform: translateY(0);
    /* return to flat on click */
    color: var(--brainiest-orange);
}

/* Astro Bounce Animation */
@keyframes astroBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
        color: var(--brainiest-orange);
    }
}

/* Astro Spin Animation */
@keyframes astroSpin {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(20deg);
    }

    50% {
        transform: rotate(-20deg);
    }

    75% {
        transform: rotate(20deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Apply bounce */
#helpToggle.astroBounce i {
    animation: astroBounce 0.6s ease-in-out;
}

/* Apply spin */
#helpToggle.astroSpin i {
    animation: astroSpin 0.6s ease;
}

.fa-paw {
    color: var(--brainiest-blue);
    z-index: 10;
    font-size: 3rem;
}

.fa-paw:hover {
    color: var(--navy-drool);
}

@media (max-width: 767px) {

    #sidebar-handle,
    #quicktips-sidebar,
    #quicktips-trigger {
        display: none;
    }

    #full-page-chatbot {
        min-height: 80vh;
    }
}

/* Styles for Tabbed Applets */
.applet-container {
    display: flex;
    font-family: 'Roboto', sans-serif;
    max-width: 1140px;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
}

.tabs {
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
    border-right: 1px solid #ccc;
    width: 175px;
}

.tab-button {
    padding: 10px;
    text-align: left;
    color: var(--brainiest-black);
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
    border-bottom: 1px solid #ccc;
    font-size: 14px;
    text-wrap: wrap;
}

.tab-button:hover {
    background-color: var(--brainiest-blue);
}

.tab-button.active,
.tab-button:focus {
    background-color: var(--brainiest-blue);
    font-weight: bold;
    color: var(--brainiest-black);
}

.tab-content {
    flex: 1;
    padding: 15px;
    opacity: 0;
    max-height: 0;
    width: 100%;
    position: absolute;
    /* Position absolutely to prevent layout shifts */
    left: 0;
    right: 0;
    overflow: hidden;
    transition: opacity 0.3s ease;
    display: none;
}

.tab-content.active {
    display: block;
    opacity: 1;
    max-height: none;
    position: relative;
    /* Return to normal flow when active */
}

/* Ensure the container maintains proper positioning context */
.applet-container {
    position: relative;
    display: flex;
    font-family: 'Roboto', sans-serif;
    max-width: 1140px;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
}

/* Ensure proper spacing within fieldsets */
.applet-container fieldset div:last-of-type {
    margin-bottom: 1rem;
}

/* Ensure fieldsets maintain full width */
.tab-content fieldset {
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
}

.tab-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.back-link,
.next-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: none;
    border: none;
    color: #0056b3;
    font-size: 0.9em;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.back-link:hover,
.next-link:hover {
    color: #003d7a;
    text-decoration: underline;
}

.back-link:focus,
.next-link:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

.back-link i,
.next-link i {
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

.next-link:hover i {
    transform: translateX(3px);
}

.back-link:hover i {
    transform: translateX(-3px);
}

@media (max-width: 600px) {

    .tab-navigation .next-link span,
    .tab-navigation .back-link span {
        display: none;
        /* Hide text, show only icons */
    }
}

/* Mobile Layout Styles */
@media (max-width: 768px) {
    .applet-container.mobile-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }

    .applet-container.mobile-layout .mobile-tab-wrapper {
        width: 100%;
        margin-bottom: 20px;
    }

    .applet-container.mobile-layout .tabs.mobile-tabs {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        margin-bottom: 20px;
        width: 100%;
        border: none;
        background: none;
        padding: 0;
    }

    .applet-container.mobile-layout .tab-button.mobile-tab {
        flex: 1 1 auto;
        min-width: 120px;
        max-width: 200px;
        font-size: 14px;
        padding: 8px 12px;
        margin: 0;
        border-radius: 6px;
        border: 1px solid #ddd;
        background-color: #f8f9fa;
        color: #333;
        cursor: pointer;
        transition: all 0.2s ease;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        position: relative;
        box-sizing: border-box;
    }

    .applet-container.mobile-layout .tab-button.mobile-tab:hover {
        background-color: #e9ecef;
        border-color: #adb5bd;
    }

    .applet-container.mobile-layout .tab-button.mobile-tab.active {
        background-color: #007bff;
        color: white;
        border-color: #007bff;
        box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
    }

    .applet-container.mobile-layout .tab-button.mobile-tab:focus {
        outline: 2px solid #007bff;
        outline-offset: 2px;
    }

    /* Tab content styling for mobile */
    .applet-container.mobile-layout .tab-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background-color: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .applet-container.mobile-layout .tab-content.active {
        display: block !important;
        max-height: none !important;
        max-width: 100% !important;
    }

    /* Form field styling for mobile */
    .applet-container.mobile-layout .form-field {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        margin-bottom: 15px;
    }

    .applet-container.mobile-layout textarea.form-field {
        min-height: 100px;
        resize: vertical;
    }

    .applet-container.mobile-layout select.form-field {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 8px center;
        background-repeat: no-repeat;
        background-size: 16px;
        padding-right: 40px;
        appearance: none;
    }

    /* Field groups and rows for mobile */
    .applet-container.mobile-layout .field_row,
    .applet-container.mobile-layout .field_row1 {
        flex-direction: column;
        gap: 15px;
    }

    .applet-container.mobile-layout .field_group {
        width: 100%;
        margin-bottom: 15px;
    }

    /* Label styling for mobile */
    .applet-container.mobile-layout .label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #333;
        font-size: 14px;
    }

    /* Required asterisk styling */
    .applet-container.mobile-layout .required-asterisk {
        color: #dc3545;
        margin-left: 2px;
    }

    /* Navigation buttons for mobile */
    .applet-container.mobile-layout .tab-navigation {
        display: flex;
        justify-content: space-between;
        margin-top: 20px;
        gap: 10px;
    }

    .applet-container.mobile-layout .back-link,
    .applet-container.mobile-layout .next-link {
        flex: 1;
        padding: 12px 16px;
        border: 1px solid #007bff;
        border-radius: 6px;
        background-color: #007bff;
        color: white;
        text-decoration: none;
        text-align: center;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .applet-container.mobile-layout .back-link:hover,
    .applet-container.mobile-layout .next-link:hover {
        background-color: #0056b3;
        border-color: #0056b3;
    }

    .applet-container.mobile-layout .back-link:focus,
    .applet-container.mobile-layout .next-link:focus {
        outline: 2px solid #007bff;
        outline-offset: 2px;
    }

    /* Button row styling for mobile */
    .applet-container.mobile-layout + .button_row2 {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 20px;
        justify-content: center;
    }

    .uploadButtons, .downloadButtons, .resetButtons, .restoreButtons, .saveButtons, #modelSelectButton, .keyboardInstructions {
        display: none;
    }

    .applet-container.mobile-layout + .button_row2 button {
        flex: 1 1 auto;
        min-width: 120px;
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 6px;
        border: 1px solid #ddd;
        background-color: #f8f9fa;
        color: #333;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .applet-container.mobile-layout + .button_row2 .submit_button {
        background-color: #28a745;
        color: white;
        border-color: #28a745;
    }

    .applet-container.mobile-layout + .button_row2 .submit_button:hover {
        background-color: #218838;
        border-color: #1e7e34;
    }

    /* Hide keyboard instructions on mobile */
    .applet-container.mobile-layout .keyboardInstructions {
        display: none;
    }

    /* Screen reader only class */
    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

/* Tablet Layout Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .applet-container {
        max-width: 100%;
        margin: 0 auto;
    }

    .applet-container .tabs {
        flex-direction: column;
        width: 200px;
        min-width: 200px;
    }

    .applet-container .tab-button {
        font-size: 14px;
        padding: 10px 12px;
    }
}/* End custom CSS */