@import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700);

@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
html,
body {
  color: #707070;
  font-size: 17px;
  font-family: 'Lato', sans-serif;
  padding-top: 44px;
  padding-bottom: 28px;
  background-color: #ffffff;
  background-image: url(../img/wallpaper/sandpaper.png);
  line-height: 180%;
}

a {
  color: #4e79a7;
  font-weight: bold;
  text-decoration: none;
}
a:hover {
  color: #3d6490;
  text-decoration: underline;
}

span.emphasized{
  color: #4e79a7 !important;
}

form span.form-label {
  font-size: 14px;
  font-family: 'Lato', sans-serif;
  font-weight: bold;
}

div.anchor {
    position: relative;
    top: -70px;
    visibility: hidden;
}

.logo-container{
  margin-top: 20px;
  margin-bottom: 20px;
}

#logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

#logo > a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #4e79a7;
  text-decoration: none;
}

#logo > a:hover {
  text-decoration: none;
}

#logo img {
  width: 80px;
  height: auto;
}

.logo-text {
  font-size: 3.6em;
  font-weight: bold;
  color: #4e79a7;
  text-shadow: 1px 2px 2px rgba(0,0,0,0.15);
}

span.slogan{
 font-size: 1.2em; 
 font-weight:bold;
 text-decoration: none;
 text-shadow: 1px 1px 0px rgba(0,0,0,0.2);
}

div.demo-gif {
  padding: 20px 15px;
  text-align: center;
}

div.demo-gif img {
  max-width: 50%;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #f5f5f5;
  border-top: 1px solid lightgray;
}

#footer p {
  margin: 0 !important;
  padding: 4px 1em !important;
  font-size: 0.75em;
  line-height: 1.4;
}

.file_upload {
	position: relative;
	overflow: hidden;
	margin: 10px;
}
.file_upload input.upload {
	position: absolute;
	top: 0;
	right: 0;
	margin: 0;
	padding: 0;
	font-size: 20px;
	cursor: pointer;
	opacity: 0;
	filter: alpha(opacity=0);
}

#input-textarea {
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.inline-form {
  display: inline-block;
  width: auto;
  vertical-align: middle;
  font-size: 14px;
  padding: 0.25rem 0.5rem;
}

span.form-label {
  display: inline-block;
  font-weight:bold;
  width: 170px;
  flex-shrink: 0;
  font-size: 1.1em;
  text-align: right;
  padding-right: 1em;
  vertical-align: middle;
}

div#lang_controller,
div#voice_controller,
div#rate_controller,
div#resolution_controller,
div#fontfamily_controller,
div#font_controller,
div#wallpaper_controller,
div#accent_color_controller,
div#highlight_background_color_controller,
div#text_background_controller,
div#tts_provider_controller,
div#tts_api_key_controller,
div#tts_cloud_voice_controller,
div#tts_cloud_rate_controller {
  display: flex;
  align-items: baseline;
}

div.alert {
  margin: 1em;
  display:none;
  white-space: pre-line;
}

span#rate_disabled_message, span#textarea_message {
  display:none;
}

div#lang_controller, div#rate_controller, div#voice_controller, div#font_controller,
div#accent_color_controller, div#highlight_background_color_controller, div#resolution_controller, div#text_background_controller, div#wallpaper_controller, div#fontfamily_controller,
div#tts_provider_controller, div#tts_api_key_controller, div#tts_cloud_voice_controller,
div#tts_cloud_rate_controller {
  margin-bottom: 10px;
}


.md h1, .md h2, .md h3, .md h4, .md h5, .md h6,
.md .h1, .md .h2, .md .h3, .md .h4, .md .h5, .md .h6 {
  font-weight: bold;
  text-shadow: 1px 1px 0px rgba(0,0,0,0.2);
  margin-top: 0em !important;
  margin-bottom: 0.5em !important;
}

.md h2,
.md .h2{
  display:inline-block;
  margin-top: 1.2em !important;
  margin-bottom: 0.6em !important;
  color: #4e79a7;
  border-top: 3px solid lightgray;
  border-bottom: 3px solid lightgray;
}

.md h3,
.md .h3 {
  display:inline-block;
  margin-top: 1em !important;
  margin-bottom: 0.4em !important;
  color: #59a14f;
  border-bottom: 3px solid lightgray;
}

.md h4,
.md .h4 {
  margin-top: 0.8em !important;
  margin-bottom: 0.3em !important;
}

.md h5,
.md .h5 {
  margin-top: 0.8em !important;
  margin-bottom: 0.3em !important;
}

.md li {
  line-height: 1.8;
}

.md img {
  border: solid 1px lightgray;
}


.ctrl-wrapper {
    position: fixed;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    text-align: center;
    z-index: 1000;
    background-color: #777777;
    color: #eeeeee;
    width: 50px;
    height: 48px;
    line-height: 48px;
    right: 30px;
    bottom: 30px;
    padding-top: 2px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    -webkit-transition: all 0.5s ease-in-out;
    -moz-transition: all 0.5s ease-in-out;
    -ms-transition: all 0.5s ease-in-out;
    -o-transition: all 0.5s ease-in-out;
    transition: all 0.5s ease-in-out;
}

.ctrl-wrapper:hover {
    background-color: #888888;
}

.ctrl-wrapper.scroll-top.show {
    visibility:visible;
    cursor:pointer;
    opacity: 1.0;
}

.ctrl-wrapper.scroll-top i.fa-solid {
    line-height: inherit;
}

.ctrl-wrapper.scroll-top {
    visibility: hidden;
}

pre {
    display: block;
    padding: 9.5px;
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.42857143;
    color: #333;
    word-break: break-all;
    word-wrap: break-word;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.social{
  margin-bottom:15px;
}

.social .twitter-tweet-fb {
  display: inline-block;
  position: relative;
  top: 0px;
  bottom: 0px;
  line-height: 0;
  vertical-align: bottom !important;
}

.social .fab-like {
  display: inline-block;
  position: relative;
  top: 0px;
  bottom: 0px;
  line-height: 0;
  vertical-align: bottom !important;
  vertical-align: middle;
}

div.tldr {
  color: #707070;
  background-color: #f5f5f5;
  border: solid 1px #ccc !important;
  padding: .75rem 1.25rem;
  margin-top: 50px;
  margin-bottom: 50px;
  border: 1px solid transparent;
  border-radius: 4px;
}

span.highlighted{
  color: #ffffff;
  background-color:#4e79a7;
  font-weight: bold;
  text-shadow:-1px 1px 2px rgba(0,0,0,0.25);
  display: inline-block;
  padding-right: 4px;
  padding-left: 4px;
  opacity: 0.8;
  margin-top: 2px;
  margin-bottom: 2px;
}

.table-condensed td,
.table-condensed th,
.table-sm td,
.table-sm th {
  color: #707070;
  padding: 4px;
  font-size: 0.9em;
}

blockquote{
  padding: 9.5px;
  margin: 0 0 10px;
  color: #333;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
}

blockquote p{
  margin: 10px;
}

nav {
  border-bottom: 2px solid lightgray;
  background-color: #f5f5f5 !important;
  font-size: 0.85em;
}

nav .dropdown-menu {
  font-size: 0.95em;
}

nav a.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  font-size: 1.3em;
  color: #4e79a7 !important;
}

.navbar-logo {
  height: 28px;
  width: auto;
}

hr {
  margin-top: 1.2em;
  margin-bottom: 1.2em;
}

div.more-margin {
  padding-right: 10%;
  padding-left: 10%;
}

pre {
  margin-top: 0;
  margin-bottom: 1rem;
}

span.marker{
  background-color: #F5EDB9;
}

/* Button overrides to match page color scheme */
#submit_button.btn-primary {
  background-color: #4e79a7;
  border-color: #4e79a7;
}
#submit_button.btn-primary:hover {
  background-color: #3d6490;
  border-color: #3d6490;
}

#download_button.btn-success {
  background-color: #59a14f;
  border-color: #59a14f;
}
#download_button.btn-success:hover {
  background-color: #4a8a42;
  border-color: #4a8a42;
}

#clear_button.btn-light,
#reset_button.btn-light {
  color: #707070;
  border-color: #ccc;
}
#clear_button.btn-light:hover,
#reset_button.btn-light:hover {
  background-color: #e9e9e9;
}

/* Dropzone + button row container */
#dropzone-button-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 4px;
}

/* Button row */
#button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: center;
}

#button-row .btn {
  font-size: 13px;
}

#button-row .dropdown-menu {
  font-size: 13px;
  min-width: auto;
}

#button-row .dropdown-item {
  color: #707070;
  padding: 4px 14px;
}

#button-row .dropdown-item:hover {
  color: #333;
}

/* Settings layout */
#settings-and-images {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: rgba(255,255,255,0.6);
}

#settings-column {
  width: 100%;
}

.settings-group {
  margin-bottom: 6px;
}

.settings-group-header {
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.settings-group-header .form-label {
  width: auto;
  text-align: left;
  padding-right: 0;
}

.settings-group-header .settings-caret {
  transition: transform 0.15s;
  width: 12px;
  display: inline-block;
}

.settings-group-header.open .settings-caret {
  transform: rotate(90deg);
}

.settings-group-body {
  padding-left: 12px;
  border-left: 2px solid #ddd;
  margin-bottom: 4px;
}

.app-container {
  margin-top: 4px;
  margin-bottom: 0;
}

/* Editor footer & dropzone */
#editor-footer {
  text-align: right;
  font-size: 0.75em;
  padding: 0 4px;
  line-height: 1.4;
}

#editor-dropzone {
  flex-shrink: 0;
  font-size: 13px;
}

#image-drop-zone {
  border: 2px dashed #ccc;
  border-radius: 4px;
  padding: 6px 12px;
  color: #999;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  white-space: nowrap;
  font-size: 13px;
}

#image-drop-zone:hover,
#image-drop-zone.drag-over {
  border-color: #4e79a7;
  background-color: rgba(78, 121, 167, 0.05);
}

#image-drop-zone i {
  margin-right: 4px;
  color: #bbb;
}

#image-drop-zone span {
  font-size: 1em;
}

#image-list-container {
  font-size: 1em;
  margin-top: 0;
  line-height: 1.2;
}

#image-list-container > small {
  color: #999;
}

#image-list {
  max-height: 80px;
  overflow-y: auto;
}

.image-list-item {
  display: flex;
  align-items: center;
  padding: 2px 0;
  border-bottom: 1px solid #eee;
}

.image-list-item img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 2px;
  margin-right: 6px;
  border: 1px solid #ddd;
}

.image-list-item .image-name {
  cursor: pointer;
  color: #4e79a7;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-list-item .image-name:hover {
  text-decoration: underline;
}

.image-list-item .image-remove {
  cursor: pointer;
  color: #999;
  margin-left: 8px;
  font-size: 0.9em;
}

.image-list-item .image-remove:hover {
  color: #e15759;
}

/* Editor + filmstrip layout */
#editor-preview-container {
  display: flex;
  align-items: stretch;
}

#editor-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 570px;
  position: relative;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.85; }
}

#editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  font-size: 13px;
  font-weight: bold;
  color: #707070;
  border-radius: 4px 4px 0 0;
}

#editor-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Style panel toggle button */
#style-panel-toggle {
  cursor: pointer;
  color: #999;
  font-weight: normal;
  font-size: 12px;
  transition: color 0.15s;
  user-select: none;
}

#style-panel-toggle:hover {
  color: #4e79a7;
}

#style-panel-toggle.active {
  color: #4e79a7;
}

/* Style panel */
#style-panel {
  background: #eef2f7;
  border: 1px solid #ccc;
  border-top: none;
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
}

.sp-group {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 0;
}

.sp-label {
  font-size: 10px;
  color: #999;
  font-weight: bold;
  text-transform: uppercase;
  margin-right: 2px;
  white-space: nowrap;
}

.sp-btn {
  border: 1px solid #ddd;
  background: #fff;
  color: #555;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  line-height: 1.4;
  white-space: nowrap;
}

.sp-btn:hover {
  background: #e8f0fe;
  border-color: #4e79a7;
  color: #4e79a7;
}

.sp-btn:active {
  background: #d0e0f5;
}

.sp-btn i {
  font-size: 11px;
}

/* Filmstrip resize handle */
#filmstrip-handle {
  flex: none;
  width: 6px;
  cursor: col-resize;
  background: transparent;
  border-radius: 3px;
  transition: background 0.15s;
}

#filmstrip-handle:hover,
#filmstrip-handle.dragging {
  background: #4e79a7;
}

/* Filmstrip panel */
#filmstrip-panel {
  flex: none;
  width: 250px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.filmstrip-sync-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 11px;
  gap: 5px;
  user-select: none;
  vertical-align: middle;
}

.filmstrip-sync-label input {
  display: none;
}

.filmstrip-sync-slider {
  position: relative;
  width: 28px;
  height: 16px;
  background: #ccc;
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.filmstrip-sync-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.filmstrip-sync-label input:checked + .filmstrip-sync-slider {
  background: #4e79a7;
}

.filmstrip-sync-label input:checked + .filmstrip-sync-slider::after {
  transform: translateX(12px);
}

.filmstrip-sync-text {
  color: #999;
  transition: color 0.2s;
}

.filmstrip-sync-label input:checked ~ .filmstrip-sync-text {
  color: #4e79a7;
}

#filmstrip-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

#filmstrip-scroll::-webkit-scrollbar {
  width: 4px;
}

#filmstrip-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.filmstrip-thumb {
  position: relative;
  width: 100%;
  border: 2px solid #ddd;
  border-radius: 3px;
  margin-bottom: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s;
}

.filmstrip-thumb:hover {
  border-color: #999;
}

.filmstrip-thumb.active {
  border-color: #4e79a7;
  box-shadow: 0 0 0 1px #4e79a7;
}

.filmstrip-thumb iframe {
  display: block;
  border: none;
  pointer-events: none;
  transform-origin: top left;
}

.filmstrip-num {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 9px;
  color: #fff;
  background: rgba(0,0,0,0.4);
  border-radius: 2px;
  padding: 0 3px;
  line-height: 1.4;
  z-index: 1;
}

#preview_toggle_button.active,
#settings_toggle_button.active {
  background-color: #4e79a7;
  border-color: #4e79a7;
  color: #fff;
}
#preview_toggle_button.active:hover,
#settings_toggle_button.active:hover {
  background-color: #3d6490;
  border-color: #3d6490;
}

/* Filmstrip lightbox */
#filmstrip-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
}

#filmstrip-lightbox.active {
  display: block;
}

.filmstrip-lightbox-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  background: #fff;
}

.filmstrip-lightbox-wrap iframe {
  display: block;
  border: none;
  transform-origin: 0 0;
}

.filmstrip-lightbox-counter {
  position: absolute;
  bottom: 16px;
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  pointer-events: none;
}

.filmstrip-lightbox-close {
  position: absolute;
  top: 12px;
  right: 20px;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.filmstrip-lightbox-close:hover {
  opacity: 1;
}

@media (max-width: 900px) {
  #preview_toggle_button {
    display: none !important;
  }
  #filmstrip-handle {
    display: none !important;
  }
  #filmstrip-panel {
    display: none !important;
  }
  #dropzone-button-row {
    flex-direction: column;
  }
}
