/* =========================================================
   styles/user-menu.css
   Alt Şerit Maskesi, Hesap Modalı ve Chat Panel Animasyonları
   ========================================================= */

.guest-only, .auth-only { display: none !important; }
body.state-guest .guest-only { display: flex !important; }
body.state-auth .auth-only { display: grid !important; }

#footer-mask {
  position: absolute; left: 0; right: 0; bottom: 0; height: 64px !important; background: #ffffff !important; 
  border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: center; 
  padding: 0 24px; box-sizing: border-box; z-index: 2;
}

#promo-container { width: 100%; align-items: center; justify-content: center; gap: 16px; }
.promo-text { font-size: 13px; color: var(--txt); font-weight: 500; }
.promo-btn { background-color: var(--brand); color: #ffffff; border: none; padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: bold; cursor: pointer; transition: opacity 0.2s; }
.promo-btn:hover { opacity: 0.85; }

#auth-footer-wrapper { width: 100%; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }

#user-info {
  position: static !important; display: flex !important; align-items: center; gap: 10px; margin: 0; padding: 6px 12px 6px 6px;
  cursor: pointer; border-radius: 999px; transition: background-color 0.2s; transform: none !important; max-width: max-content;
}
#user-info:hover { background-color: #f9fafb; }
#user-avatar { width: 36px; height: 36px; background: #e5e7eb; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--brand); font-size: 14px; flex-shrink: 0; }
.user-text { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
.user-name-row { display: flex !important; align-items: center; gap: 4px; line-height: 1; }
#user-name { font-size: 14px; font-weight: 600; color: var(--txt); white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; line-height: 1; }
#user-plan { display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 11px; font-weight: 500; color: #4b5563; line-height: 1; background: #f9fafb; }
.user-caret { font-size: 10px; color: #9ca3af; margin-left: 6px; }

#chat-trigger-container { display: flex; justify-content: center; width: 100%; min-width: 400px; }
#chat-input-mock { display: flex; align-items: center; background: #f3f4f6; border-radius: 999px; padding: 10px 20px; cursor: text; border: 1px solid transparent; width: 100%; max-width: 600px; transition: background-color 0.2s, border-color 0.2s; }
#chat-input-mock:hover { background: #e5e7eb; border-color: #d1d5db; }
#chat-input-mock svg { color: #5f6368; margin-right: 12px; flex-shrink: 0; }
#chat-placeholder { color: #6b7280; font-size: 14px; user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Chat Yan Panel */
#chat-slide-panel {
  position: fixed; bottom: 0; right: 24px; width: 380px; height: calc(100vh - 200px); max-height: 580px;
  background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15); z-index: 10000;
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease; transform: translateY(100%); opacity: 0;
}
#chat-slide-panel.slide-open { transform: translateY(0); opacity: 1; }
#finly-chat-iframe { width: 100%; height: 100%; border: none; flex-grow: 1; }
#iframe-shield { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 99; display: none; background: rgba(0, 0, 0, 0.1); cursor: pointer; }
#iframe-shield.active { display: block; }

/* Modallar */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); display: none; align-items: flex-end; justify-content: flex-start; z-index: 9998; }
.modal-inner { min-width: 280px; max-width: 300px; background: #f6f4ee; color: var(--brand); border-radius: 22px; padding: 24px 24px 20px; border: 1px solid #d7ded5; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); box-sizing: border-box; margin-top: 0; margin-bottom: 80px; margin-left: 24px; }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; color: var(--brand); }
.modal-text { font-size: 14px; line-height: 1.5; margin: 6px 0 18px; color: #35463b; }
.modal-row { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin: 6px 0; }
.modal-label { color: #425347; }
.modal-value { font-weight: 600; text-align: right; color: var(--brand); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.modal-btn { padding: 8px 16px; border-radius: 999px; border: 1px solid transparent; font-size: 14px; cursor: pointer; }
.modal-btn-primary { background: var(--brand); border-color: var(--brand); color: #ffffff; }
.modal-btn-primary:hover { background: #173225; }
.modal-btn-secondary { background: transparent; border-color: #9fb1a4; color: var(--brand); }
.modal-btn-secondary:hover { background: rgba(157, 179, 165, .15); }

@media (max-width: 820px) {
  #promo-container { justify-content: center; text-align: center; }
  .promo-text { display: none; }
  #footer-mask { padding: 0 8px; }
  body.state-auth #auth-footer-wrapper { display: flex !important; justify-content: space-between; gap: 8px; }
  #user-info { padding: 4px 8px 4px 4px !important; max-width: 140px; }
  #user-avatar { width: 28px; height: 28px; font-size: 12px; }
  #user-name { font-size: 12px; max-width: 80px; }
  #user-plan { font-size: 10px; padding: 1px 6px; }
  
  #chat-trigger-container { min-width: 0 !important; flex-grow: 1; justify-content: flex-end; }
  #chat-input-mock { padding: 8px 12px !important; }
  #chat-placeholder { font-size: 11px !important; margin-left: 0; }
  
  .modal-overlay { align-items: center; justify-content: center; }
  .modal-inner { margin: 0; max-width: calc(100% - 32px); }
  #iframe-shield { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; z-index: 9999 !important; background: rgba(0, 0, 0, 0.4) !important; }
}