/**
 * MeetAssist Shared View Styles
 * Styles for LoginView and ConfigurationView components
 */

/* ============================================
   LOGIN VIEW STYLES
   ============================================ */

.login-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 0;
}

/* Header */
.login-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header .logo-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.login-header .logo-text {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

/* Title */
.login-title {
  padding: 32px 16px 24px;
  text-align: center;
}

.login-title h1 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px 0;
}

.login-title p {
  font-size: 14px;
  color: #9ca3af;
  margin: 0;
}

/* Login Button */
.login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 16px;
  padding: 13px 24px;
  background: #6366f1;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  font-family: inherit;
}

.login-button:hover {
  background: #5558e3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.login-button:active {
  transform: translateY(0);
}

/* Info */
.login-info {
  padding: 16px;
  text-align: center;
}

.login-info p {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
}

/* Footer */
.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  margin-top: auto;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer a {
  font-size: 12px;
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.login-footer a:hover {
  color: #818cf8;
  text-decoration: underline;
}


/* ============================================
   CONFIGURATION VIEW STYLES
   ============================================ */

.config-view {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px;
  position: relative;
}

.config-layout {
  display: flex;
  gap: 24px;
  width: 100%;
}

/* News Panel (Left) */
.config-news-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  min-width: 280px;
}

.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.news-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.news-version {
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border-radius: 4px;
  font-weight: 500;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.news-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  transition: background 0.15s;
}

.news-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.news-item-badge {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 4px;
  height: fit-content;
  flex-shrink: 0;
}

.news-item-badge.new {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.news-item-badge.improved {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}

.news-item-badge.fixed {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.news-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.news-item-title {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.news-item-desc {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
}

.news-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6366f1;
  text-decoration: none;
  transition: color 0.15s;
}

.news-link:hover {
  color: #818cf8;
}

/* Config Content (Right) */
.config-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 320px;
}

.config-heading {
  margin-bottom: 16px;
  text-align: center;
}

.config-heading .top-bar-brand {
  font-size: 22px;
  font-family: 'Russo One', sans-serif;
  color: #fff;
  display: block;
}

.config-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
  display: block;
}

/* Settings Section */
.config-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

/* Field styles */
.config-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-field-half {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-row {
  display: flex;
  gap: 10px;
}

.config-label {
  color: #d1d5db;
  font-size: 13px;
  font-weight: 500;
}

.config-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
}

.config-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.config-input::placeholder {
  color: #6b7280;
}

/* Select button */
.config-select-btn {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}

.config-select-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Format display in select button */
.config-select-btn .format-name {
  font-weight: 500;
}

.config-select-btn .format-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  margin-left: 6px;
}

/* Format picker option without icon */
.picker-option.format-option {
  padding: 14px 16px;
}

.picker-option.format-option .option-info {
  flex: 1;
}

/* Format group */
.config-format-group {
  display: flex;
  gap: 8px;
}

.config-format-btn {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.15s;
  font-family: inherit;
}

.config-format-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.config-format-btn.active {
  background: rgba(100, 150, 255, 0.08);
  border-color: rgba(100, 150, 255, 0.5);
  color: rgba(255, 255, 255, 0.9);
}

.config-format-btn .format-name {
  font-weight: 600;
}

.config-format-btn .format-desc {
  font-size: 9px;
  opacity: 0.5;
}

/* Opacity control */
.config-opacity-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.opacity-btn {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-family: inherit;
}

.opacity-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

.opacity-triangle-wrap {
  flex: 1;
  height: 24px;
  position: relative;
  display: flex;
  align-items: center;
}

.opacity-triangle-bg {
  position: absolute;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  border-radius: 4px;
}

.opacity-triangle-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;
  background: linear-gradient(to right, rgba(100, 150, 255, 0.3) 0%, rgba(100, 150, 255, 0.6) 100%);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  border-radius: 4px;
  transition: width 0.1s;
}

.opacity-slider {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.opacity-value {
  min-width: 40px;
  text-align: right;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}

/* Auto detection row */
.config-autodetect-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.config-autodetect-row .config-label {
  margin: 0;
  white-space: nowrap;
}

.config-autodetect-row .mode-toggle {
  flex-shrink: 0;
}

.config-autodetect-row .mode-btn {
  padding: 6px 20px;
}

/* Start button */
.config-start-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  margin-top: 4px;
  font-family: inherit;
}

.config-start-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.config-start-btn:active {
  transform: translateY(0);
}

/* Error container */
.config-error {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  text-align: center;
}

.config-error .error-title {
  color: #f87171;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 3px;
}

.config-error .error-message {
  color: #fca5a5;
  font-size: 11px;
  line-height: 1.4;
}

/* Footer */
.config-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.config-footer a {
  color: #6b7280;
  font-size: 11px;
  text-decoration: none;
  transition: color 0.2s;
}

.config-footer a:hover {
  color: #9ca3af;
}

.config-footer a#config-logout-btn:hover {
  color: #f87171;
}

.config-footer .separator {
  color: #3f3f46;
}


/* ============================================
   PICKER STYLES (Language, Style)
   ============================================ */

.config-picker {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgb(15 20 28 / var(--ma-bg-opacity, 0.95));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 20px;
  z-index: 101;
  overflow: hidden;
}

.picker-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 360px;
  height: 100%;
}

.picker-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.picker-back-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  color: #fff;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  transition: background 0.2s;
  font-family: inherit;
}

.picker-back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.picker-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.picker-search {
  padding: 0 0 12px 0;
}

.picker-search-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.picker-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.picker-search-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}

.picker-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
}

.picker-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.picker-option.selected {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.5);
}

.picker-option .option-flag {
  font-size: 18px;
}

.picker-option .option-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.picker-option .option-name {
  font-weight: 500;
}

.picker-option .option-desc {
  font-size: 11px;
  color: #9ca3af;
}

.picker-option .option-badge {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border-radius: 4px;
  font-weight: 500;
}

.picker-option .check-icon {
  color: #6366f1;
  margin-left: auto;
}


/* ============================================
   SCROLLBAR STYLES (for pickers)
   ============================================ */

.picker-list::-webkit-scrollbar {
  width: 4px;
}

.picker-list::-webkit-scrollbar-track {
  background: transparent;
}

.picker-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.picker-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
