/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* Top bar: two large tappable tabs + subtle log out */
.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  padding: 0;
  background: #2d2d2d;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.app-header__tabs {
  display: flex;
  flex: 1;
  min-width: 0;
}

.app-header__tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 0.5rem;
  text-decoration: none;
  color: #ccc;
  font-weight: 600;
  font-size: 1.05rem;
  border: none;
  background: #2d2d2d;
  -webkit-tap-highlight-color: transparent;
}

.app-header__tab--active {
  color: #fff;
  background: #1a1a1a;
  box-shadow: inset 0 -3px 0 #4a9eff;
}

.app-header__tab:active {
  background: #444;
}

.app-header__end {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  flex-shrink: 0;
}

.app-header__end--solo {
  width: 100%;
  justify-content: center;
}

.app-header__logout {
  font-size: 0.8rem;
  color: #999;
  text-decoration: none;
  padding: 0.25rem 0.35rem;
  white-space: nowrap;
}

.app-header__logout:hover,
.app-header__logout:focus {
  color: #ccc;
  text-decoration: underline;
}

body {
  font-family: Arial, sans-serif;
  text-align: center;
  background-color: #eaebe6;
  background-size: 20%;
  margin: 0;
}

h1 img,
.overlay img {
  max-width: 300px;
  height: auto;
  border-radius: 100%;
}

h1 .title {
  font-size: 80%;
  margin-bottom: 20px;
}

h1 {
  margin: 20px auto;
  width: 100vw;
  justify-content: center;
  align-items: center;
  max-width: 200px;
  display: flex;
  flex-direction: column;
}

#player.plyr__video-embed {
  position: relative;
}

.plyr__video-embed iframe {
  top: -50%;
  height: 200%;
}

/* Paused only: two corner buttons. No full-bleed layer (iOS will not pass taps to iframe through overlaid divs). */
#player .player-skip-float__btn {
  position: absolute;
  z-index: 4;
  top: 0.4rem;
  -webkit-tap-highlight-color: transparent;
  min-width: min(5.5rem, 28vw);
  min-height: 3.25rem;
  padding: 0.4rem 0.65rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.1;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.5rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  text-shadow: 0 0.06em 0.15em rgba(0, 0, 0, 0.5);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#player .player-skip-float__btn--back {
  left: 0.4rem;
}

#player .player-skip-float__btn--forward {
  right: 0.4rem;
}

#player .player-skip-float__btn.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.plyr__controls__item[aria-label="PIP"] {
  display: none !important;
  /* Hide Picture-in-Picture button */
}

/* Larger -10s / +10s skip controls (Plyr rewind / fast-forward) */
.plyr__control[data-plyr="rewind"],
.plyr__control[data-plyr="fast-forward"] {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.5rem;
}

.overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 10;
  text-align: center;
  color: white;
  font-size: 20px;
  line-height: 100%;
  padding-top: 10%;
}

.overlay img {
}

.list-video {
  margin-top: 20px;
  display: flex;
}

.button-danger {
  background-color: #e74c3c; /* Red color */
  color: white; /* White text */
  padding: 12px 24px; /* Bigger padding for a bigger button */
  font-size: 18px; /* Increase the font size */
  border: none; /* Remove default border */
  border-radius: 8px; /* Rounded corners */
  cursor: pointer; /* Pointer cursor on hover */
  text-align: center; /* Center the text */
  display: inline-block; /* Make sure the button displays inline */
  transition: background-color 0.3s ease; /* Smooth background color transition */
}

.button-danger:hover {
  background-color: #c0392b; /* Darker red on hover */
}

#videos {
  align-items: center;
  flex-direction: column;
  display: flex;
}

/* Channel: latest videos (thumbnail + title, like main video list) */
.channel-videos {
  max-width: 900px;
  margin: 1rem auto 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.channel-video-tile {
  text-align: left;
}

.channel-video-tile__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.channel-video-tile__thumb {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 4px;
  background: #222;
  vertical-align: top;
}

.channel-video-tile__thumb--dim {
  opacity: 0.5;
}

.channel-video-tile__placeholder {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16 / 9;
  background: #333;
  border-radius: 4px;
}

.channel-video-tile__title {
  display: block;
  margin-top: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}

.channel-video-tile--missing {
  opacity: 0.8;
}

.channel-video-tile__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.88rem;
  color: #555;
  font-weight: normal;
}

.channel-videos-heading {
  text-align: center;
  font-size: 1.1rem;
  margin: 0.5rem 0 0.25rem;
}

.channel-videos-count {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin: 0 0 1rem;
}

.channel-videos-empty {
  text-align: center;
  color: #666;
  margin: 1rem 0;
}

/* Big tappable page numbers for channel video list */
.channel-pager {
  max-width: 900px;
  margin: 1.25rem auto 0.5rem;
  padding: 0 0.5rem 1.5rem;
}

.channel-pager__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.35rem;
}

.channel-pager__list li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.channel-pager__num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  color: #1a1a1a;
  background: #f0f0f0;
  border: 2px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}

a.channel-pager__num:hover,
a.channel-pager__num:focus {
  background: #e0e0e0;
  border-color: #999;
}

a.channel-pager__num.is-active,
.channel-pager__num.is-active {
  background: #333;
  color: #fff;
  border-color: #111;
  pointer-events: none;
  cursor: default;
}

.channel-pager__edge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  min-height: 2.75rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  color: #1a1a1a;
  background: #f5f5f5;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 0 0.5rem;
  box-sizing: border-box;
}

a.channel-pager__edge:hover,
a.channel-pager__edge:focus {
  background: #e8e8e8;
}

.channel-pager__edge.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.channel-pager__ellipsis {
  padding: 0 0.25rem;
  font-size: 1.2rem;
  line-height: 1;
  color: #666;
  user-select: none;
}

.channel-show-title {
  text-align: center;
  margin: 0.5rem 0 1.25rem;
  font-size: 1.35rem;
}

/* Channels list: one row per channel — first-video thumb + large name */
.channels-index-heading {
  margin: 0.75rem 0 1.25rem;
  font-size: 1.15rem;
  text-align: center;
}

.channels-index {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.channels-index__row {
  border-bottom: 1px solid #ddd;
  padding: 0.75rem 0;
}

.channels-index__row:last-child {
  border-bottom: none;
}

.channels-index__link {
  display: block;
  text-decoration: none;
  color: #111;
}

.channels-index__thumb {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 6px;
  background: #333;
}

.channels-index__thumb--placeholder {
  aspect-ratio: 16 / 9;
  min-height: 6rem;
}

.channels-index__name {
  margin: 0.6rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  color: inherit;
}

.delete-video {
  margin-left: 20px;
}

/* Form Container */
form {
  max-width: 600px;
  margin: 20px auto;
  padding: 20px;
  background-color: #f7f7f7;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Form Elements */
label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
  font-family: "Arial", sans-serif;
  transition: border-color 0.3s ease-in-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: #007bff;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

button[type="submit"] {
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

button[type="submit"]:hover {
  background-color: #0056b3;
}

/* Optional: Style for form title */
form h2 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
  font-size: 24px;
}
