/* ==========================================================================
   Components CSS — extracted from test_chat.html
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Auth Overlay & Container
   -------------------------------------------------------------------------- */
.auth-overlay {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 1) 100%),
    url("../../common/img/pattern.png");
  padding: 20px;
}
.auth-overlay.hidden {
  display: none;
}
.auth-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

/* --------------------------------------------------------------------------
   2. Auth Logo
   -------------------------------------------------------------------------- */
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--bg-primary) url(../../common/img/icon_56_56.png) no-repeat
    center;

  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: white;
}
.auth-logo h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}
.auth-logo p {
  font-size: 13px;
  color: var(--blue);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   2b. Auth About (service description on landing)
   -------------------------------------------------------------------------- */
.auth-about {
  margin-bottom: 24px;
  padding: 14px 16px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}
.auth-about-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.auth-about-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}
.auth-price-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
  transition: opacity 0.2s;
}
.auth-price-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   3. Auth Tabs
   -------------------------------------------------------------------------- */
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
}
.auth-tab:hover {
  color: var(--text-primary);
}
.auth-tab.active {
  background: var(--active);
  color: white;
  /*box-shadow: 0 2px 8px rgba(232, 86, 42, 0.3);*/
}

/* --------------------------------------------------------------------------
   4. Auth Form Inputs & Buttons
   -------------------------------------------------------------------------- */
input[type="number"] {
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-form input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--transition);
}
.auth-form input.error {
  border: 2px solid var(--red);
}
.auth-form input:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px var(--blue-glow);
}
.auth-form input::placeholder {
  color: var(--text-muted);
}
.auth-form button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
  margin-top: 4px;
}
.auth-form button:hover {
  background: var(--accent-hover);
  /*transform: translateY(-1px);*/
  /*box-shadow: 0 4px 12px rgba(232, 86, 42, 0.3);*/
}
.auth-form button:active {
  transform: translateY(0);
}
.auth-form button:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.auth-msg {
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.5;
}
.auth-msg.success {
  color: var(--green);
}
.auth-msg.error {
  color: var(--red);
}
.auth-link {
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  transition: color var(--transition);
  background: none !important;
  border: 2px solid var(--accent) !important;
  font-family: inherit;
  text-align: center;
}
.auth-link:hover {
  color: var(--blue-hover);
  text-decoration: underline;
}
.auth-info {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   5. Logged-in Bar
   -------------------------------------------------------------------------- */
.logged-in-bar {
  background: var(--bg-secondary);
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  flex-shrink: 0;
}
.logged-in-bar.hidden {
  display: none;
}
.logged-in-bar .email {
  color: var(--blue);
  font-weight: 600;
}
.logged-in-bar .logout-btn {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: all var(--transition);
  margin-left: auto;
}
.logged-in-bar .logout-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

/* --------------------------------------------------------------------------
   6. Lightbox
   -------------------------------------------------------------------------- */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-overlay.visible {
  display: flex;
  animation: lightboxFadeIn 0.25s ease-out;
}
@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  animation: lightboxZoomIn 0.25s ease-out;
}
@keyframes lightboxZoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ─── Focus-visible states ─── */
.auth-form button:focus-visible,
.auth-tab:focus-visible,
.auth-link:focus-visible,
.section-tab:focus-visible,
.logout-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .lightbox-overlay.visible,
  .lightbox-overlay img,
  .section-animate-in {
    animation: none;
  }
}

/* ─── Touch optimization ─── */
button, a, input, select, textarea {
  touch-action: manipulation;
}
