
html {
  scroll-behavior: auto;
}

:root {
    color-scheme: light dark; /* native controls + scrollbars follow the theme */
    --swp-bg: #ffffff;
    --swp-text: #000000;
    --swp-panel: #eeeeee;
    --swp-panel-border: #dddddd;
    --swp-input-bg: #ffffff;
    --swp-muted: #6c757d;
    --swp-focus: #1c4fd8;
}
@media (prefers-color-scheme: dark) {
    :root {
        --swp-bg: #14161a;
        --swp-text: #e6e6e6;
        --swp-panel: #23262b;
        --swp-panel-border: #3a3e45;
        --swp-input-bg: #1d2025;
        --swp-muted: #9aa0a6;
        --swp-focus: #8fb2ff;
    }
}
body {
    font-family: Arial;
    font-size: 20px;
    padding: 0;
    margin: 0;
    background: var(--swp-bg);
    color: var(--swp-text);
}
p{margin: 0 0 10px 0;font-size:17px;}
li{font-size:17px;}
select, input, button, textarea {
    font-size: 20px;
}
button {
    cursor: pointer;
}

img {
  width: 100%; /* or max-width: 100%; */
  height: auto;
}

select {
    padding: 5px 10px;
}
.block {display: block;}
.hidden {display: none;}
.inline-block{display: inline-block;}

.logo a {
    margin: 0 auto;
    display: table;
    text-decoration: none;
}
.logo a:hover {
    text-decoration: underline;
}

.logo a img {
    width: 100%;
}
.mini-btn {
    background: var(--swp-input-bg);
    border: none;
    border-radius: 5px;
    padding: 3px 6px;
    min-width: 36px; /* touch target */
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.mini-btn:hover {
    background: var(--swp-panel);
}
.mini-btn:focus {
    transform: scale(1.1);
}
body * {
-webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
        box-sizing: border-box;
}
.relative {
    position: relative;
}
.editor-buttons {
	position: absolute;
	bottom: 10px;
	right: 10px;
}
.editor-stats {
	position: absolute;
	bottom: 15px;
	left: 10px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.text-center {
    text-align: center;
}
.cursor {
    cursor: pointer;
}
.hover:hover {
    opacity: 0.8;
}
.ml-0 {margin-left:0;}.ml-5 {margin-left:5px;}.ml-10 {margin-left:10px;}
.mr-0 {margin-right:0;}.mr-5 {margin-right:5px;}.mr-10 {margin-right:10px;}
.mb-0 {margin-bottom: 0px;}.mb-5 {margin-bottom: 5px;}.mb-10 {margin-bottom: 10px;}.mb-15 {margin-bottom: 15px;}.mb-30 {margin-bottom: 30px;}
.mt-0 {margin-top: 0px;}.mt-5 {margin-top: 5px;}.mt-10 {margin-top: 10px;}.mt-15 {margin-top: 15px;}.mt-30 {margin-top: 30px;}
.width100{width:100%;}
.fs-14 {
    font-size: 14px;
}
.lh-0{line-height:0;}
.flex-1 {
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex-2 {
	display: flex;
	align-items: center;
	justify-content: flex-start; /* Align items to the left */
}

.flex-2 > *:not(:last-child) {
	margin-right: 5px; /* Add gap between items */
}

.btn {
  position: relative;
  padding: 1rem 3rem;
  font-family: Lato, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5;
  color: black;
  text-decoration: none;
  background-color: #ffffff; /* keeps the gradient text readable */
  border: transparent;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  
}
.btn-gradient {
  background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
  background-size: 400%;
}
.btn-gradient-anim {
  animation: changeGradientAnimation 8s linear infinite;
}


@keyframes changeGradientAnimation {
  0% {
    background-position: 0%;
  }
  100% {
    background-position: 400%;
  }
}

ul {
    margin: 0;
    padding: 0;
    list-style: disc;
    margin-left: 25px;
}

h1, h2, h3, h4, h5, h6 {
    padding: 0 10px;
    margin: 5px 0 5px 0;
    background: var(--swp-panel);
    border: 1px solid var(--swp-panel-border);
    border-left: 3px solid blue;
}
h1 { font-size: 26px; }
h2 { font-size: 22px; }
h3 { font-size: 19px; }
h4 { font-size: 18px; }
h5 { font-size: 17px; }
h6 { font-size: 16px; }

ul.simple li {
    margin-bottom: 5px;
    font-size: 15px;
}

.colors_gray1 {
    color: #5b5b5b;
}
.c-blue-1:hover {
    color: rgba(38,38,212,1);
}
.white {
    color: white;
}

.translate {
    margin-left: auto;
    margin-right: auto;
}
.translate .editor {
    width: 100%;
    min-height: 250px;
    padding: 10px;
    padding-bottom: 46px; /* room for the copy/delete overlay */
    background: blue;
    background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(38,38,212,1) 56%, rgba(0,212,255,1) 100%);
    color: #fff;
	-webkit-box-shadow: 0 10px 6px -6px #777;
	   -moz-box-shadow: 0 10px 6px -6px #777;
	        box-shadow: 0 10px 6px -6px #777;
    border-radius: 10px;
}
.translate .editor:hover {
    background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(38,38,212,1) 36%, rgba(0,212,255,1) 100%);
}
.translate select {
    max-width: 150px;
}
#chars_count {
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 7px;
    border-radius: 4px;
}


#source_text::placeholder {
  color: #ccc;
  opacity: 1; /* Firefox */
}


.translate #translated_text {
    background: var(--swp-input-bg);
    border: 1px solid var(--swp-panel-border);
    color: var(--swp-text);
}
#translate {
	padding: 2px 20px;
	border-radius: 5px;
	cursor: pointer;
	font-family: Arial;
	font-weight: bold;
	color: #fff;
	font-size: 25px;
    z-index: 1;
    margin: 0 auto;
    border-bottom: 2px solid #00f3ff;
}

#translate:hover {

}

.swap_languages {
    background: var(--swp-input-bg);
    color: var(--swp-text);
    border: 1px solid var(--swp-panel-border);
    min-width: 38px; /* touch target */
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.swap_languages:hover {
    color: blue;
}

.langs-list li {
    display: inline-block;
}


.langs-list li a {
    display: inline-block;
    padding: 4px 8px;
    background-image: linear-gradient(25deg, #28007a, #3540a0, #3275c7, #00abef);
    color: #fff;
    text-decoration: none;
    font-size:17px;

}
.langs-list li a:hover {
    background: #000;
    color: #fff;
}
.top-line {
    height: 5px;
    background: linear-gradient(to right, #12c2e9, #c471ed, #f64f59);
}
.bottom-line {
    height: 5px;
    background-image: linear-gradient(to right top, #d16ba5, #c777b9, #ba83ca, #aa8fd8, #9a9ae1, #8a95e8, #7591ef, #578df6, #2f77fe, #005eff, #0040ff, #0c00ff);
}
.footer {
    padding: 10px;
}

#preloader {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 9999;
}
.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
@media (max-width: 768px) {
    html .media-max-tablet-block {
        display: block;
    }
}

/* visible breadcrumbs on /phrases/ + /keyboard/ (tpl-phrases/tpl-keyboard) */
.crumbs{font-size:.85em;color:#6c757d;margin:0 0 1.2em 0;}
.crumbs a{color:#6c757d;text-decoration:none;}
.crumbs a:hover{color:#0d6efd;text-decoration:underline;}
.crumbs .crumb-sep{margin:0 .45em;color:#adb5bd;}

/* keyboard focus is always visible (links, buttons, chips, virtual keys) */
:focus-visible {
    outline: 3px solid var(--swp-focus);
    outline-offset: 2px;
}

/* skip link: invisible until focused via keyboard */
.skip-link{position:absolute;left:-9999px;top:0;background:var(--swp-input-bg);color:var(--swp-text);padding:10px 16px;z-index:99999;text-decoration:none;border:2px solid var(--swp-focus);}
.skip-link:focus{left:10px;top:10px;}

/* footer navigation menu (ul.menu had no styling at all) */
.menu{list-style:none;margin-left:0;padding:0;display:inline-flex;flex-wrap:wrap;gap:4px 14px;}
.menu li{font-size:15px;}

/* per-page sections that carry their own inline styles — these selectors
   outrank them so dark mode reaches phrases/keyboard pages too */
.phrases-page .phrases-nav{background:var(--swp-panel);}
.keyboard-page .kb-table td{background:var(--swp-input-bg);border-color:var(--swp-panel-border);color:var(--swp-text);}
div#keyboard{background:var(--swp-panel);border-color:var(--swp-panel-border);}
.keyboard-row .key{background:var(--swp-input-bg);border-color:var(--swp-panel-border);color:var(--swp-text);}
.keyboard-row .key:hover{background:var(--swp-panel);}
.crumbs{color:var(--swp-muted);}
.crumbs a{color:var(--swp-muted);}

/* Choices.js widgets (styles.php loads before choices.min.css, so these
   selectors are one class heavier to win the cascade) */
.translate .choices__inner{background:var(--swp-input-bg);color:var(--swp-text);border-color:var(--swp-panel-border);}
.translate .choices__list--dropdown{background:var(--swp-input-bg);color:var(--swp-text);border-color:var(--swp-panel-border);}
.translate .choices__list--dropdown .choices__item--selectable.is-highlighted,
.translate .choices__list--dropdown .choices__item.is-highlighted{background:var(--swp-panel);}
.translate .choices__placeholder{color:var(--swp-muted);}

/* cookie consent banner: fixed bottom, no layout shift */
.swp-consent{position:fixed;bottom:0;left:0;right:0;z-index:99998;background:#222;color:#fff;padding:10px 15px;box-shadow:0 -2px 10px rgba(0,0,0,0.25);}
.swp-consent-inner{max-width:1200px;margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 16px;}
.swp-consent-text{margin:0;font-size:14px;color:#fff;}
.swp-consent-actions{display:inline-flex;gap:8px;}
.swp-consent-btn{cursor:pointer;border-radius:5px;border:1px solid #888;background:#eee;color:#222;font-size:14px;padding:6px 18px;min-height:36px;}
.swp-consent-accept{background:#1e7e34;border-color:#1e7e34;color:#fff;font-weight:bold;}
.swp-consent-accept:hover{background:#28a745;}
.swp-consent-reject:hover{background:#fff;}
@media (max-width:600px){.swp-consent-inner{flex-direction:column;}}

/* motion-sensitive users */
@media (prefers-reduced-motion: reduce) {
    html{scroll-behavior:auto;}
    .btn-gradient-anim{animation:none;}
    .mini-btn{transition:none;}
    .spinner{animation-duration:1.6s;}
    .notifier div{transition:none !important;}
}
