@charset "UTF-8";

/* ===================== */
/* TRUE BASE STYLES      */
/* ===================== */
/* These styles work on ALL devices without modification */
/* NO fixed widths, NO fixed heights, NO desktop-specific layouts */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-weight: normal;
  font-family: Raleway;
}

:root {
  --bg-dark: #1a202c;
  --text-light: #e2e8f0;
  --border-color: #4a5568;
  --accent-color: #4299e1;
  --hover-color: #2b6cb0;
  --panel-radius: 15px;
  --transition-speed: 0.3s;
}

body {
  background-color: #0d0d0d;
  color: #d0d8e6;
  font-size: 1.1rem;
  min-height: 100vh;
}

/* ===================== */
/* COMMON LAYOUT         */
/* ===================== */
/* REMOVED: .a-container styles - they are device-specific */
/* REMOVED: Fixed panel dimensions - they are device-specific */

.panel {
  background-color: #1a1a1a;
  border-radius: var(--panel-radius);
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
  color: #d0d8e6;
  border: 1px solid transparent;
  transition: border var(--transition-speed) ease;
}

.panel:hover,
.panel:focus {
  border: 1px solid #007bff;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  width: 100%;
}

/* ===================== */
/* COMMON LINK STYLES    */
/* ===================== */
/* Base link styles for all containers */
#central-cover a,
#right-cover a {
  color: #99c7f2 !important;
  text-decoration: none !important;
}

#central-cover a:hover,
#central-cover a:focus,
#right-cover a:hover,
#right-cover a:focus {
  color: orange !important;
  text-decoration: underline !important;
}

#central-cover a:active,
#right-cover a:active {
  color: red !important;
}

#central-cover a:visited,
#right-cover a:visited {
  color: burlywood !important;
}

/* Writer link styles */
.writer-link {
  color: #99c7f2;
  text-decoration: none;
  cursor: pointer;
  display: block;
  padding: 2px 0 !important;
}

.writer-link:hover,
.writer-link:focus {
  color: orange;
  text-decoration: underline;
}

.writer-link:active {
  color: red;
}

.writer-link:visited {
  color: burlywood;
}

/* ===================== */
/* COMMON SCROLLING      */
/* ===================== */
/* Central and Right Panel Containers */
#central-panel.central-panel,
#right-panel.right-panel {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}

/* Content areas that hold loaded templates */
#central-cover.panel-content,
#right-cover.panel-content {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}

/* Marco div from templates - this should scroll */
.marco {
  flex: 1 !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  height: auto !important;
  padding-top: 15px;
  padding-bottom: 15px;
}

/* ===================== */
/* COMMON HEADERS        */
/* ===================== */
/* REMOVED: Fixed height (80px) - device files will set this */
.left-header,
.central-header,
.right-header {
  color: #d0d8e6;
  background-color: #1a1a1a;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

/* ===================== */
/* COMMON BUTTON STYLES  */
/* ===================== */
.tiny-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #333333;
  padding: 5px 10px;
  margin: 0 4px;
  border-radius: 12px;
  font-size: 12px;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: none;
  height: 28px;
  min-width: 60px;
  cursor: pointer;
}

.tiny-button:hover,
.tiny-button:focus {
  background-color: #262626;
  outline: none;
}

.tiny-button:active {
  background-color: #454545;
}

.search-button {
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-button:hover {
  background-color: #007bff;
  color: #fff;
}

.search-button:focus {
  outline: 2px solid rgba(0, 123, 255, 0.5);
  outline-offset: 1px;
}

/* ===================== */
/* UNIFIED TOGGLE BUTTON */
/* ===================== */
/* Consistent toggle button for ALL theme pages */

/* ===== base-theme-pages.css ===== */

/* CRITICAL: Ensure panel-a is positioned container */
#panel-a {
  position: relative !important;
  overflow: visible !important;
  /* Allow toggle to be visible outside */
}

/* UNIFIED TOGGLE BUTTON */
.panel-toggle {
  /* Positioning - absolute within #panel-a */
  position: absolute !important;
  top: 50% !important;
  right: -12px !important;
  /* Half outside panel */
  transform: translateY(-50%) !important;
  z-index: 1000 !important;
  /* Above other elements */

  /* Size - consistent circle */
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  border-radius: 50% !important;
  padding: 0 !important;

  /* Appearance - blue theme */
  background-color: #2b6cb0 !important;
  border: 2px solid #1a202c !important;
  color: white !important;
  cursor: pointer !important;

  /* Center icon */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  /* Remove defaults */
  outline: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  font-family: inherit !important;
  line-height: 1 !important;
  font-size: 12px !important;
  text-decoration: none !important;
}

/* Hover states */
.panel-toggle:hover {
  background-color: #3182ce !important;
  transform: translateY(-50%) scale(1.1) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4) !important;
}

.panel-toggle:focus {
  background-color: #2c5282 !important;
  outline: 2px solid rgba(66, 153, 225, 0.5) !important;
  outline-offset: 2px !important;
}

.panel-toggle:active {
  background-color: #2a4365 !important;
  transform: translateY(-50%) scale(0.95) !important;
}

/* Icon */
.panel-toggle i {
  font-size: 12px !important;
  line-height: 1 !important;
  margin: 0 !important;
  display: block !important;
  transition: transform var(--transition-speed) ease !important;
}

/* Expanded state */
#panel-a.expanded .panel-toggle i {
  transform: rotate(180deg) !important;
}

/* Common touch target sizes */
.panel-toggle,
.search-button,
.search-result-item,
.tiny-button {
  min-height: 44px;
  min-width: 44px;
}

/* NEEDED? Collapsed state - default rotation */
/*#panel-a:not(.expanded) .panel-toggle i {
   transform: rotate(0deg) !important;
}*/

/* ===================== */
/* COMMON FORM STYLES    */
/* ===================== */
.search-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: #121212;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.search-container:hover,
.search-container:focus-within {
  background-color: #1a1a1a;
  border-color: #007bff;
}

.search-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.search-group:hover,
.search-group:focus {
  border-color: #007bff;
}

.label-container {
  text-align: left;
  margin-bottom: 5px;
}

.search-label {
  white-space: nowrap;
  color: #d0d8e6;
  font-size: 0.8rem;
  display: block;
}

.input-with-icon {
  display: flex;
  align-items: center;
  position: relative;
}

.search-input::placeholder {
  text-align: center;
  color: #99c7f2;
}

.search-input {
  flex-grow: 1;
}

/* ===================== */
/* COMMON SELECTORS      */
/* ===================== */
/* REMOVED: Fixed widths (220px, 280px) - device files will set these */
.selector-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  margin-bottom: 5px;
  position: relative;
}

.selector-container label,
.selector-container .search-label {
  margin-bottom: 5px;
  font-size: 1rem;
  color: #d0d8e6;
  text-align: center;
  width: 100%;
  display: block;
  font-weight: 500;
  line-height: 1.4;
}

/* Base select styling WITHOUT fixed width */
.selector-container select,
.selector-container .search-select {
  padding: 10px 45px 10px 20px;
  border: 1px solid #555;
  border-radius: 25px;
  background-color: #2a2a2a;
  color: #99c7f2;
  font-size: 1rem;
  text-align: center;
  text-align-last: center;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2399c7f2'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* REMOVED: width: 220px; - device files will set this */
}

.selector-container select:hover,
.selector-container .search-select:hover {
  border-color: #007bff;
  background-color: #333;
}

.selector-container select:focus,
.selector-container .search-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.selector-container select option,
.selector-container .search-select option {
  background-color: #2a2a2a;
  color: #d0d8e6;
  padding: 12px 15px;
  font-size: 0.95rem;
  text-align: left;
}

/* Base search input WITHOUT fixed width */
.search-input-selector {
  /* REMOVED: width: 280px !important; - device files will set this */
  padding: 10px 45px 10px 20px !important;
  border: 1px solid #555 !important;
  border-radius: 25px !important;
  background-color: #2a2a2a !important;
  color: #99c7f2 !important;
  font-size: 1rem !important;
  text-align: center !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  margin: 0 auto !important;
  display: block !important;
}

.search-input-selector::placeholder {
  color: #99c7f2 !important;
  opacity: 0.7 !important;
  text-align: center !important;
}

.search-input-selector:hover {
  border-color: #007bff !important;
  background-color: #333 !important;
}

.search-input-selector:focus {
  outline: none !important;
  border-color: #007bff !important;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25) !important;
  background-color: #2a2a2a !important;
}

.search-input-selector:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  background-color: #333 !important;
}

.search-input-container {
  position: relative;
  display: flex;
  align-items: center;
  /* REMOVED: width: fit-content; - device files will set this */
  margin: 0 auto;
}

.search-input-container .search-button {
  position: absolute;
  right: 15px;
  background: none;
  border: none;
  color: #99c7f2;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.search-input-container .search-button i {
  font-size: 16px;
}

.search-input-container .search-button:hover {
  color: #007bff;
}

.search-input-selector:disabled+.search-button {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===================== */
/* COMMON SEARCH FORMS   */
/* ===================== */
.search-form {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 20px;
  background-color: #333;
  transition: border-color 0.2s;
  overflow: hidden;
  /* REMOVED: fixed height - device files will set this */
  max-width: 100%;
}

.search-form:hover,
.search-form:focus {
  border: 1px solid #007bff;
}

.search-form .search-btn {
  padding: 0 12px;
  border: none;
  background-color: transparent;
  color: #d0d8e6;
  cursor: pointer;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 0 20px 20px 0;
  outline: none;
}

.search-form input {
  background-color: #333;
  border: none;
  color: #d0d8e6;
  padding: 8px 12px;
  height: 100%;
  outline: none;
  flex-grow: 1;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

#cinemaSearchForm,
#literatureSearchForm {
  flex: 1;
  min-width: 0;
  max-width: 600px;
}

.search-box {
  display: flex;
  width: 100%;
}

#cinemaSearchInput,
#literatureSearchInput,
#composerSearchInput {
  flex-grow: 1;
  padding: 8px 20px;
  border: 1px solid #444;
  border-right: none;
  border-radius: 20px 0 0 20px;
  background-color: #333;
  color: #d0d8e6;
  font-size: 1rem;
}

.navbar-right {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding-left: 20px;
}

/* ===================== */
/* COMMON TABLES & LISTS */
/* ===================== */
.mytable {
  width: 100%;
  border-collapse: collapse;
  background-color: transparent;
  color: #d0d8e6;
}

.mytable th,
.mytable td {
  text-align: left;
  vertical-align: middle;
  font-size: 1.1rem;
}

.mytable tr:hover {
  background-color: #121212;
}

.writer-item-container {
  padding: 0 !important;
}

.info-icon {
  text-align: right;
  width: 20px;
}

.film-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul {
  list-style-type: none;
}

li {
  margin-bottom: 3px;
  cursor: pointer;
}

li:hover,
li:focus {
  color: lightgreen;
}

.film-item {
  text-decoration: none;
  cursor: pointer;
}

/* ===================== */
/* COMMON MOVIE DISCOVERY */
/* ===================== */
.movie-discovery {
  width: 100%;
  padding: 0;
}

.burly,
h4.burly {
  color: burlywood;
  margin-bottom: 10px;
  font-size: 20px;
}

.selector-label {
  font-size: 1rem;
  margin-right: 10px;
}

.movie-carousel {
  display: grid;
  /* REMOVED: grid-template-columns - device files will set this */
  gap: 5px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  max-height: 100vh;
  scrollbar-width: thin;
  scrollbar-color: #444 #121212;
}

.movie-carousel::-webkit-scrollbar {
  width: 8px;
}

.movie-carousel::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 4px;
}

.movie-carousel::-webkit-scrollbar-track {
  background-color: #121212;
}

.movie-card {
  display: flex;
  align-items: center;
  background: #333;
  border-radius: 5px;
  padding: 0;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
  max-height: 75px;
  margin-bottom: 5px;
}

.movie-image {
  flex: 0 0 30px;
  height: 30px;
  margin-right: 10px;
  overflow: hidden;
}

.movie-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.movie-link {
  font-size: 0.9rem;
  color: #99c7f2;
  text-decoration: none;
}

.movie-link:hover {
  text-decoration: underline;
  color: #ffa500;
}

/* ===================== */
/* COMMON ACCORDION      */
/* ===================== */
.sites-accordion,
.literary-container {
  margin-top: 20px;
}

.accordion-header,
.literary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: all 0.3s ease;
}

.accordion-header:hover,
.literary-header:hover {
  background: rgba(255, 255, 255, 0.2);
}

.accordion-icon {
  transform: rotate(-90deg);
  transition: transform 0.3s ease;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(0deg);
}

.literary-header::after {
  content: '+';
  font-size: 18px;
  transition: transform 0.3s ease;
}

.literary-header.active::after {
  content: '-';
}

.accordion-content,
.literary-content {
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  transition: max-height 0.3s ease-out;
}

.accordion-content[aria-hidden="true"],
.literary-content:not(.active) {
  max-height: 0 !important;
}

.accordion-content[aria-hidden="false"],
.literary-content.active {
  max-height: 1000px;
  display: block;
}

.literary-content {
  padding-left: 20px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.literary-list {
  list-style: none;
  padding: 5px 0 5px 15px;
  margin: 0;
}

.literary-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.load-writers-link {
  color: #99c7f2;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 5px 0;
}

.load-writers-link:hover {
  color: orange;
  text-decoration: underline;
  padding-left: 5px;
}

.literary-info {
  color: rgba(255, 255, 255, 0.6);
  margin-left: 10px;
  transition: color 0.3s ease;
}

.literary-info:hover {
  color: orange;
}

/* ===================== */
/* COMMON UTILITIES      */
/* ===================== */
.loading,
.error-message {
  padding: 20px;
  text-align: center;
  color: #666;
}

.loading-indicator {
  padding: 20px;
  text-align: center;
  color: #666;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #09f;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.panel-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.panel-error {
  padding: 20px;
  text-align: center;
  color: #d9534f;
}

.panel-error button {
  background: #d9534f;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
}

/* ===================== */
/* COMMON FONT AWESOME   */
/* ===================== */
.fas,
.far,
.fal,
.fab,
.fa {
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

.fa-home:before {
  content: "\f015";
}

/* ===================== */
/* COMMON SCROLLBAR      */
/* ===================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background-color: transparent;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background-color: #8a98a8;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #79a6d2;
}

/* ===================== */
/* COMMON SEARCH RESULTS */
/* ===================== */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #2a2a2a;
  border: 1px solid #555;
  border-radius: 8px;
  max-height: 300px;
  overflow-y: scroll;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: none;
}

.search-results.show {
  display: block;
}

.search-result-item {
  padding: 8px 20px;
  color: #d0d8e6;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #3a3a3a;
  font-size: 0.9rem;
  line-height: 1.3;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: #007bff;
  color: white;
}

.search-results::-webkit-scrollbar {
  width: 8px;
}

.search-results::-webkit-scrollbar-track {
  background: #2a2a2a;
  border-radius: 0 8px 8px 0;
}

.search-results::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: #007bff;
}