/* Global typography */
html {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
  font-size: 16px;
}
body { font-family: inherit; margin: 0;background: #f8f9fa;color:#444;}
button, input, select, textarea { font: inherit; }

/* Layout constants */
:root {
  --header-height: 90px; /* sync with .header min-height */
}

/* копия из news_bot/static/css/news_bot.css */
/* Модалки используют глобальные стили .btn-auth (см. components/navigation.css) */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: saturate(120%) blur(1.5px);
    z-index: 999;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 440px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    z-index: 1000;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}

.modal-body {
    padding: 16px;
    display: grid;
    gap: 10px;
}

.modal-body label {
    display: grid;
    gap: 6px;
    color: #333;
    font-size: 14px;
}

.modal-body input[type="email"],
.modal-body input[type="password"] {
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all .2s ease;
}

.modal-body input[type="email"]:focus,
.modal-body input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.link-like {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* Стили для кнопок в модальных окнах */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #5a93ff, #4a84f6);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-1px);
}

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

/* Логотип в навигации */
.nav-link {
    position: relative;
    display: inline-block;
    line-height: 0; /* убираем влияние межстрочного интервала */
}

.nav-logo {
    height: 70px;
    width: auto;
    border-radius: 12px;
    display: block;
    transition: opacity .15s ease;
}

.nav-logo-hover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    opacity: 0;
    transition: opacity .15s ease;
    pointer-events: none;
}

.nav-link:hover .nav-logo { opacity: 0; }
.nav-link:hover .nav-logo-hover { opacity: 1; }

/* Навигация: отступ перед шестерёнкой и устранение перекрытия */
.nav-actions {
  display: flex;
  align-items: center;
  /* prevent scrollbars from transient hover effects */
  overflow: hidden;
  max-width: 100%;
}
.btn-instruction {
  position: relative;
  z-index: 0;
}
.nav-settings {
  position: relative;
  z-index: 1; 
  display: inline-flex;
  align-items: center;
  overflow: visible;
  line-height: 0;
}
.nav-settings svg {
  width: 36px;
  height: 36px;
  display: block;          
  overflow: visible;       
  transform-origin: 50% 50%;
  transform-box: fill-box;
  backface-visibility: hidden;
  transition: transform .35s ease;
}
.nav-settings:hover svg { transform: rotate(180deg); }

/* Responsive fixes: allow nav-actions to wrap on small screens */
@media (max-width: 768px) {
  .nav-actions {
    flex-wrap: wrap;
    width: 100%;
    gap: 8px;
  }
}

/* Feed Selection Modal Styles */
.feed-selection-item {
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 0;
}

.feed-selection-item:last-child {
  border-bottom: none;
}

.feed-selection-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  margin: 0;
  font-weight: normal;
}

.feed-selection-checkbox {
  flex-shrink: 0;
  margin: 4px 0 0 0;
  transform: scale(1.2);
}

.feed-selection-info {
  flex: 1;
  min-width: 0;
}

.feed-selection-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  word-break: break-word;
}

.feed-selection-url {
  font-size: 14px;
  color: #666;
  word-break: break-all;
}

#feedSelectionModal .modal-body {
  max-width: 600px;
}

#feedSelectionList {
  background: #fafafa;
  border-radius: 8px;
}

#feedSelectionList:empty::after {
  content: "Загрузка...";
  display: block;
  text-align: center;
  padding: 20px;
  color: #666;
}
