/* ============================================================
   ✍️ UUTISKIRJOITTIMEN TEKSTINMUOTOILUTYÖKALUT
   ============================================================ */
.news-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #F5F1E8;
  border: 1px solid #2B2B2B;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 4px 8px;
}

.news-toolbar-btn {
  background: #ffffff;
  border: 1px solid #2B2B2B;
  border-radius: 4px;
  color: #2B2B2B;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.news-toolbar-btn:hover {
  background: #2B2B2B;
  border-color: #2B2B2B;
  color: #F5F1E8;
}

.news-toolbar-sep {
  color: #2B2B2B;
  font-size: 12px;
  margin: 0 4px;
  user-select: none;
}

.news-editor-area {
  min-height: 90px;
  max-height: 250px;
  overflow-y: auto;
  background: #ffffff !important;
  border-radius: 0 0 8px 8px !important;
  border-top: 1px solid #2B2B2B !important;
  outline: none;
  line-height: 1.5;
}

.news-editor-area[contenteditable="true"]:empty::before {
  content: attr(data-placeholder);
  color: #2B2B2B;
  font-style: italic;
}

/* ============================================================
   📰 UUTISARTIKKELIKORTIT (NEWS & CHANGELOG CARDS)
   ============================================================ */
.news-article-card {
  background: #F5F1E8;
  border: 1px solid #2B2B2B;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.news-article-card:last-child {
  margin-bottom: 0;
}

.news-article-title {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #2B2B2B;
  margin: 0 0 4px 0;
  line-height: 1.25;
  letter-spacing: 0.5px;
}

.news-article-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.news-article-header .news-article-title {
  flex: 1 1 auto;
  min-width: 0;
}

.news-article-chevron {
  display: inline-block;
  font-size: 11px;
  color: #2B2B2B;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.news-article-card.collapsed .news-article-chevron {
  transform: rotate(-90deg);
}

.news-article-card.collapsed .news-article-content {
  display: none;
}

.news-article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #2B2B2B;
}

.news-category-badge {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: 7.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.1;
  background: #2E5E4E;
  color: #ffffff;
}

.news-category-badge.badge-uutinen {
  background: #2E5E4E;
  color: #ffffff;
}

.news-category-badge.badge-changelog {
  background: #0284c7;
  color: #ffffff;
}

.news-category-badge.badge-tiedote {
  background: #b45309;
  color: #ffffff;
}

.news-category-badge.badge-tapahtuma {
  background: #7A2E3A;
  color: #ffffff;
}

.news-article-date {
  font-size: 10px;
  color: #2B2B2B;
  font-weight: 600;
}

.news-article-content {
  font-size: 11.5px;
  color: #2B2B2B;
  line-height: 1.55;
  word-break: break-word;
}

.news-article-content font[size="5"] { font-size: 16px !important; }
.news-article-content font[size="3"] { font-size: 11.5px !important; }
.news-article-content font[size="1"] { font-size: 10px !important; }

/* ============================================================
   🤝 KAVERIPYYNNÖN LÄHETYSANIMAATIO
   ============================================================ */
@keyframes friendReqPop {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(46, 94, 78, 0.5);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.btn-req-sent-anim {
  animation: friendReqPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
  background: #e6f4ea !important;
  color: #2E5E4E !important;
  border: 1px solid #2E5E4E !important;
  font-weight: 700 !important;
}
/* ============================================================
   👥 KAVERILISTA (FRIENDS LIST GRID & CARDS)
   ============================================================ */
.friends-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.friend-card-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1.5px solid #2B2B2B;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.friend-card-item:hover {
  background: #F5F1E8;
  border-color: #2E5E4E;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(46, 94, 78, 0.15);
}

.friend-avatar-container {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #2E5E4E;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.friend-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-avatar-fallback {
  width: 100%;
  height: 100%;
  background: #F5F1E8;
  color: #2B2B2B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Oswald', sans-serif;
}

.friend-name-text {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: #2B2B2B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-card-item:hover .friend-name-text {
  color: #2E5E4E;
}
/* ============================================================
   🔗 KUTSUKAVERI-MODAL & QR-KOODI (BRÄNDITYYLI #2B2B2B & #F5F1E8)
   ============================================================ */
#referralModal .modal-card {
  background: #F5F1E8 !important;
  border: 2px solid #2B2B2B !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

#referralModal .custom-header-card {
  background-color: #2B2B2B !important;
  background-image: 
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 6px),
    linear-gradient(180deg, #3A3A3A 0%, #2B2B2B 50%, #171717 100%) !important;
  border: 2px solid #2B2B2B !important;
  box-shadow: inset 0 0 0 1px rgba(245, 241, 232, 0.2), 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

#referralModal .custom-header-card h3 {
  color: #F5F1E8 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
}

#referralModal p, 
#referralModal .report-field-label {
  color: #2B2B2B !important;
}

.qr-code-wrapper {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 10px !important;
  background: #F5F1E8 !important;
  border: 2px solid #2B2B2B !important;
  border-radius: 12px !important;
  margin: 8px auto 12px auto !important;
  width: 170px !important;
  height: 170px !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.1) !important;
  box-sizing: border-box !important;
}

.qr-code-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 4px !important;
}

.referral-link-wrapper {
  display: flex !important;
  gap: 6px !important;
  margin-top: 4px !important;
  margin-bottom: 12px !important;
  align-items: center !important;
}

.referral-link-input {
  flex: 1 !important;
  font-size: 11px !important;
  padding: 8px 10px !important;
  background: #F5F1E8 !important;
  border: 1.5px solid #2B2B2B !important;
  color: #2B2B2B !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  outline: none !important;
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.1) !important;
}

#referralModal .btn-submit {
  background: #2B2B2B linear-gradient(180deg, #3A3A3A 0%, #2B2B2B 100%) !important;
  color: #F5F1E8 !important;
  border: 1px solid #171717 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

#referralModal .btn-submit:hover:not(:disabled) {
  background: linear-gradient(180deg, #484848 0%, #333333 100%) !important;
  color: #FFFFFF !important;
}

#referralModal .btn-secondary {
  background: #F5F1E8 !important;
  color: #2B2B2B !important;
  border: 1.5px solid #2B2B2B !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

#referralModal .btn-secondary:hover {
  background: #2B2B2B !important;
  color: #F5F1E8 !important;
  border-color: #2B2B2B !important;
}
/* ============================================================
   🎁 KUTSU KAVERI -MAINOSBANNERI (ETUSIVU)
   ============================================================ */
.landing-referral-banner {
  position: relative !important;
  background: linear-gradient(135deg, #fffbeb 0%, #fef08a 100%) !important;
  border: 1px solid #fcd34d !important;
  border-radius: 10px !important;
  padding: 10px 32px 10px 14px !important;
  margin: 0 10px 14px 10px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  box-sizing: border-box !important;
  align-items: center !important;
}

.landing-referral-banner .banner-content {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
}

.landing-referral-banner .banner-icon {
  font-size: 22px !important;
  flex-shrink: 0 !important;
}

.landing-referral-banner .banner-text {
  font-size: 11px !important;
  color: #2B2B2B !important;
  line-height: 1.35 !important;
  flex-grow: 1 !important;
  margin: 0 !important;
}

.landing-referral-banner .banner-action-btn {
  width: auto !important;
  flex-shrink: 0 !important;
  padding: 6px 14px !important;
  font-size: 10px !important;
  background: linear-gradient(180deg, #d97706 0%, #b45309 100%) !important;
  border: 1px solid #92400e !important;
  color: #fff !important;
  border-radius: 6px !important;
  margin: 0 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  letter-spacing: 0.5px !important;
}

.landing-referral-banner .banner-action-btn:hover {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
}

.landing-referral-banner .banner-close-btn {
  position: absolute !important;
  top: 5px !important;
  right: 5px !important;
  transform: none !important;
  background: transparent !important;
  border: none !important;
  color: #b45309 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  width: 16px !important;
  height: 16px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  opacity: 0.5 !important;
  transition: opacity 0.2s ease !important;
}

.landing-referral-banner .banner-close-btn:hover {
  opacity: 1 !important;
}

/* Mobiili-optimointi erittäin kapeille näytöille */
@media (max-width: 380px) {
  .landing-referral-banner .banner-content {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .landing-referral-banner .banner-icon {
    display: none !important;
  }
}
/* Google-kirjautumispainikkeen hover- ja aktiivityylit */
.btn-google {
  transition: all 0.2s ease !important;
}

.btn-google:hover {
  background: #F5F1E8 !important;
  border-color: #2B2B2B !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

.btn-google:active {
  transform: translateY(1px) !important;
}
/* ============================================================
   🚩 ADMIN-KÄYTTÄJÄN ILMIANTOILMOITUS (LOGON ALAPUOLELLA)
   ============================================================ */
#adminReportAlertBanner {
  margin: 6px 10px 0 10px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #88313F 0%, #58121d 100%);
  border: 1.5px solid #fca5a5;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(136, 49, 63, 0.4);
  color: #F5F1E8;
  font-size: 11.5px;
  position: relative;
  z-index: 110;
}

.admin-alert-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-alert-content span {
  color: #F5F1E8;
  font-weight: 500;
}

.admin-alert-content strong {
  color: #fef08a;
}


/* ============================================================
   ⚙️ ADMIN: SÄÄTÖARVOJEN LOMAKE
   ============================================================ */
.asetus-ryhma {
  border: 1px solid #2B2B2B;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #ffffff;
}

.asetus-ryhma-varoitus {
  border-color: #8f4954;
  border-width: 1.5px;
  background: #fdf6f7;
}

.asetus-ryhma-otsikko {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #2B2B2B;
  margin-bottom: 3px;
}

.asetus-ryhma-kuvaus {
  font-size: 10px;
  color: #5f5f5f;
  line-height: 1.35;
  margin-bottom: 8px;
}

.asetus-varoitus {
  font-size: 10px;
  line-height: 1.4;
  color: #7a2731;
  background: #fbe6e9;
  border: 1px solid #e6b8bf;
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 8px;
  font-weight: 600;
}

.asetus-rivi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dotted #d8d0c0;
}

.asetus-rivi:last-child { border-bottom: none; }

.asetus-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11.5px;
  color: #2B2B2B;
  font-weight: 600;
  line-height: 1.25;
}

.asetus-selite {
  display: block;
  font-size: 9.5px;
  font-weight: 400;
  color: #6b6b6b;
  margin-top: 1px;
}

.asetus-input {
  flex: 0 0 78px;
  width: 78px;
  padding: 5px 7px;
  border: 1.5px solid #2B2B2B;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  background: #F5F1E8;
  color: #2B2B2B;
}

.asetus-input:focus {
  outline: 2px solid #2c705f;
  outline-offset: 1px;
}

.asetus-tila {
  font-size: 10.5px;
  line-height: 1.4;
  white-space: pre-line;
  min-height: 0;
}

.asetus-tila.ok    { color: #1f5043; font-weight: 700; }
.asetus-tila.virhe { color: #8f4954; font-weight: 700; }
