/* ==========================================================================
   V15 — 1:1 watch.plex.tv Luma Modals ("Yeni Tartışma" & "Yorum Yaz")
         + Frosted LumaCommentComposer Pill Bar (Movie/Series/Episode Pages)
   ========================================================================== */

/* ---- Shared 1:1 Plex Luma Modal Surface (726px, Frosted Blur) ---- */
.v15-theme dialog.plex-luma-modal {
  width: min(726px, calc(100vw - 32px));
  max-width: 726px;
  max-height: min(88dvh, 780px);
  margin: auto;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 14, 18, 0.86);
  color: #ffffff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 6px 6px 15px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}

.v15-theme dialog.plex-luma-modal[open] {
  display: flex;
  flex-direction: column;
}

.v15-theme dialog.plex-luma-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.v15-theme:has(dialog.plex-luma-modal[open]) {
  overflow: hidden;
}

.v15-theme .plex-luma-modal-head {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 24px 64px 8px 24px;
  margin: 0;
  flex-shrink: 0;
}

.v15-theme .plex-luma-modal-head h2 {
  margin: 0;
  font-family: circularBold, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 21px !important;
  line-height: 27px !important;
  font-weight: 700;
  color: #ffffff;
}

.v15-theme .plex-luma-modal-subtitle {
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 500;
}

.v15-theme .plex-luma-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  display: grid !important;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.v15-theme .plex-luma-modal-close:hover {
  background: #ffffff !important;
  color: #000000 !important;
}

.v15-theme .plex-luma-modal-form {
  display: flex;
  flex-direction: column;
  padding: 8px 24px 24px;
  overflow-y: auto;
  gap: 14px;
}

/* Context + Category Scope Row */
.v15-theme .plex-modal-scope-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.v15-theme .plex-modal-context {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.68);
}

.v15-theme .plex-modal-context-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.v15-theme .plex-modal-context-badge span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.v15-theme .plex-modal-context-clear {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.v15-theme .plex-modal-context-clear:hover {
  background: #ffffff;
  color: #000000;
}

.v15-theme .plex-modal-context-clear[hidden] {
  display: none !important;
}

/* Pill Category Selector */
.v15-theme .plex-modal-cat-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.v15-theme .plex-modal-cat-pill select {
  appearance: none;
  -webkit-appearance: none;
  height: 34px;
  padding: 0 34px 0 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.v15-theme .plex-modal-cat-pill select:hover {
  background: rgba(255, 255, 255, 0.16);
}

.v15-theme .plex-modal-cat-pill select:focus-visible {
  box-shadow: 0 0 0 2px #ffffff;
}

.v15-theme .plex-modal-cat-pill select option {
  background: #181a20;
  color: #ffffff;
}

.v15-theme .plex-modal-cat-pill svg {
  position: absolute;
  right: 11px;
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

/* Input & Textarea Boxes (Inset 2px Ring -> Focus #fff Ring) */
.v15-theme .plex-modal-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v15-theme .plex-modal-field-box {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15);
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

.v15-theme .plex-modal-field-box:focus-within {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 2px #ffffff;
}

.v15-theme .plex-modal-field-box input[type="text"] {
  display: block;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  margin: 0;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #ffffff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 22px;
}

.v15-theme .plex-modal-field-box textarea {
  display: block;
  width: 100%;
  min-height: 148px;
  max-height: 280px;
  padding: 12px !important;
  margin: 0 !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #ffffff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px !important;
  line-height: 22px !important;
  resize: vertical;
}

.v15-theme .plex-modal-field-box input::placeholder,
.v15-theme .plex-modal-field-box textarea::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.v15-theme .plex-modal-counter-row {
  display: flex;
  justify-content: flex-end;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.58);
  font-variant-numeric: tabular-nums;
}

/* Visibility Note */
.v15-theme .plex-modal-vis-note {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.v15-theme .plex-modal-vis-label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.v15-theme .plex-modal-vis-desc {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.8);
}

/* 24x24 Plex Gold Square Checkmark Checkbox */
.v15-theme .plex-square-check {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.v15-theme .plex-square-check input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.v15-theme .plex-square-check-box {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  color: #e5a00d;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.v15-theme .plex-square-check-box svg {
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.v15-theme .plex-square-check input[type="checkbox"]:checked + .plex-square-check-box {
  border-color: #e5a00d;
  background: rgba(229, 160, 13, 0.16);
}

.v15-theme .plex-square-check input[type="checkbox"]:checked + .plex-square-check-box svg {
  opacity: 1;
  transform: scale(1);
}

.v15-theme .plex-square-check input[type="checkbox"]:focus-visible + .plex-square-check-box {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.v15-theme .plex-square-check-text {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #ffffff;
}

/* Modal Footer Row + White Pill Submit */
.v15-theme .plex-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.v15-theme .plex-modal-submit-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 92px;
  padding: 0 22px;
  border: 0;
  border-radius: 9999px;
  background: #ffffff !important;
  color: #000000 !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.v15-theme .plex-modal-submit-pill:hover:not(:disabled) {
  background: #e8e8e8 !important;
}

.v15-theme .plex-modal-submit-pill:disabled {
  opacity: 0.45;
  cursor: default;
}

.v15-theme .plex-modal-error {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: #fca5a5;
}

.v15-theme .plex-modal-error[hidden] {
  display: none !important;
}

/* ---- /tartismalar Board Primary "Yeni Tartışma Başlat" Pill ---- */
.v15-theme .plex-board-new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 9999px;
  background: #ffffff;
  color: #000000;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.v15-theme .plex-board-new-btn:hover {
  background: #e6e6e6;
}

/* ==========================================================================
   Shared 1:1 Plex LumaCommentComposer Pill Bar (Movie/Series/Episode Pages)
   Matches Discussion/detail.php .plex-composer-card 1:1
   ========================================================================== */
.v15-theme .plex-title-inline-composer {
  margin: 16px 0 20px;
}

.v15-theme .plex-inline-reply-composer {
  margin-top: 14px;
}

.v15-theme .plex-inline-reply-composer[hidden] {
  display: none !important;
}

.v15-theme .plex-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  flex-shrink: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: hsl(var(--avatar-hue, 205) 36% 45%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.v15-theme .plex-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v15-theme .plex-composer-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(24, 28, 36, 0.72);
  background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.v15-theme .plex-composer-avatar {
  width: 36px;
  height: 36px;
  font-size: 15px;
}

.v15-theme .plex-composer-pill {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  min-height: 40px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15);
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

.v15-theme .plex-composer-pill:focus-within {
  box-shadow: inset 0 0 0 2px #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.v15-theme .plex-composer-pill textarea {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 24px;
  max-height: 180px;
  padding: 2px 0 !important;
  margin: 0 !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.92);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 22px;
  resize: none;
  overflow-y: auto;
}

.v15-theme .plex-composer-pill textarea::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.v15-theme .plex-composer-spoil-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.v15-theme .plex-composer-spoil-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.v15-theme .plex-composer-spoil-btn[aria-pressed="true"] {
  background: rgba(229, 160, 13, 0.2);
  border-color: #e5a00d;
  color: #f6c445;
}

.v15-theme .plex-composer-cancel {
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.v15-theme .plex-composer-cancel:hover {
  background: #ffffff;
  color: #000000;
}

.v15-theme .plex-composer-cancel[hidden] {
  display: none !important;
}

.v15-theme .plex-composer-send {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.v15-theme .plex-composer-send:hover:not(:disabled) {
  background: #ffffff;
  color: #000000;
}

.v15-theme .plex-composer-send:disabled {
  opacity: 0.42;
  cursor: default;
}

.v15-theme .plex-composer-guest-btn {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 14px;
  border-radius: 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  line-height: 22px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.15s ease, color 0.15s ease;
}

.v15-theme .plex-composer-guest-btn:hover {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.92);
}

.v15-theme .plex-composer-status {
  margin: 6px 0 0;
  padding-inline: 12px;
  font-size: 12px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.78);
}

.v15-theme .plex-composer-status[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .v15-theme dialog.plex-luma-modal {
    width: calc(100vw - 20px);
  }
  .v15-theme .plex-luma-modal-head {
    padding: 20px 56px 6px 18px;
  }
  .v15-theme .plex-luma-modal-form {
    padding: 8px 18px 20px;
  }
  .v15-theme .plex-composer-spoil-btn span {
    display: none;
  }
  .v15-theme .plex-composer-spoil-btn {
    padding: 0 7px;
  }
}
