/**
 * PhotoXED Main App Shell Views
 * Styles for Albums list, Shared, Academy landing, Me/Profile.
 * No inline styles used in JS.
 */


.px-album-card {
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.px-album-card .px-album-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--tx3);
}

.px-album-card .px-h3 {
  font-size: 16px;
  line-height: 1.25;
  margin: 0 0 4px;
}

.px-album-card:hover {
  border-color: rgba(167, 139, 250, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.px-album-card:active {
  transform: scale(0.985);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.px-profile-card {
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}

.px-stat-row {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--glass-border);
}

.px-stat-row:last-child {
  border-bottom: none;
}

.px-section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--tx3);
  text-transform: uppercase;
  margin: var(--sp-4) 0 var(--sp-2);
}

.px-empty-state {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--tx3);
}

/* Old demo CTA styles deprecated in favor of .px-landing-actions two-card layout */

/* View system */
body.px-app #pxMain {
  position: relative;
  z-index: 1;
}

.px-view {
  padding: 16px 12px 140px;
}

/* Ensure content always clears the fixed bottom segbar */
.px-view,
.px-experience-grid,
.px-album-photo-grid {
  padding-bottom: calc(var(--segbar-height) + 48px) !important;
}

.px-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 12px;
  min-height: 32px;
}

/* Make album titles in headers take available space and truncate gracefully */
.px-view-header > .px-h3 {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.px-photo-grid-host {
  margin-top: 12px;
}

/* Buttons */
.px-btn-secondary {
  background: #222;
}

.px-btn-primary {
  background: linear-gradient(180deg, #3a3a42 0%, #222 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.px-btn-primary:active {
  transform: scale(0.985);
}

/* Compact glass buttons for view headers (Albums tab New, Back, Share, etc.)
   Replaces full-width .px-btn (which has width:100%) so they don't look too wide.
   Matches premium liquid-glass aesthetic used in demo album detail back/next. */
.px-header-btn {
  width: auto;
  margin: 0;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.1px;
  background: var(--glass-highlight);
  border: 1px solid var(--glass-border);
  color: var(--tx2);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.px-header-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--tx);
  border-color: rgba(255,255,255,0.15);
}
.px-header-btn:active {
  transform: scale(0.985);
}

/* Tiny helper for the one academy back button (keeps zero inline styles) */
.px-academy-back {
  margin-bottom: 16px;
}

/* Profile / Me */
.px-profile-row {
  margin-bottom: 16px;
}

.px-profile-value {
  font-size: 17px;
  margin-top: 2px;
}

.px-card {
  margin: 16px 0;
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: var(--sp-4);
}

.px-me-action {
  margin-top: 12px;
}

.px-me-logout {
  margin-top: 32px;
  text-align: center;
}

/* More Sheet Items - uses standard sheet body padding */
.more-icon.ic {
  --ic-size: 22px;
}

.more-chevron.ic {
  --ic-size: 16px;
  --ic-pad: 0.5px;
}

.more-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 4px;
  font-size: 16px;
  color: var(--tx);
  background: none;
  border: none;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
  gap: 12px;
  text-align: left;
  font-family: inherit;
  flex-shrink: 0;
  box-sizing: border-box;
  text-decoration: none;
}

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

@media (hover: hover) {
  .more-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--tx);
  }

  .more-item:hover .more-icon {
    opacity: 1;
  }

  .more-item:hover .more-chevron {
    opacity: 0.85;
  }
}

.more-item:active {
  background: var(--glass-highlight);
}

.more-item.is-active {
  background: var(--glass-highlight);
  color: var(--tx);
}

.more-item.is-active .more-icon {
  opacity: 1;
}

.more-item.is-active .more-chevron {
  opacity: 0.85;
}

.more-icon {
  flex-shrink: 0;
  opacity: 0.85;
  width: 22px;
  height: 22px;
  max-width: none;
  transition: opacity 120ms var(--ease);
}

.more-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
}

.more-chevron {
  flex-shrink: 0;
  opacity: 0.5;
  width: 16px;
  height: 16px;
  max-width: none;
  transition: opacity 120ms var(--ease);
}

/* Legal pages (Terms, Privacy) */
.px-legal {
  line-height: 1.55;
  font-size: 14px;
  color: var(--tx2);
}

.px-legal-section {
  margin-bottom: 16px;
}

.px-legal-section h4 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--tx);
}

.px-legal-section p,
.px-legal-section ul {
  margin: 0;
}

.px-legal-section ul {
  padding-left: 1.2em;
}

.px-legal-updated {
  margin-top: 20px;
  font-size: 12px;
  opacity: 0.6;
}

/* Dashboard */
.px-dashboard-lead,
.px-dashboard-greeting {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.45;
}

.px-dashboard-greeting {
  font-size: 17px;
  color: var(--tx);
}

.px-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.px-dash-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px;
  margin: 0;
}

.px-dash-stat-val {
  font-size: 22px;
  font-weight: 600;
  color: var(--tx);
  line-height: 1.2;
}

.px-dash-stat-lbl {
  font-size: 12px;
  color: var(--tx3);
  margin-top: 4px;
}

.px-dashboard-login {
  display: block;
  margin: 8px auto 0;
}

/* Support form */
.px-support-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.px-support-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.px-support-label {
  font-size: 13px;
  color: var(--tx3);
  font-weight: 500;
}

.px-support-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.px-support-form-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.px-support-send {
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 120ms var(--ease), transform 80ms var(--ease);
}

.px-support-send:active:not(:disabled) {
  transform: scale(0.98);
}

.px-support-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.px-support-ok {
  margin: 0;
  font-size: 14px;
  color: var(--accent);
  text-align: center;
}

.px-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Login Required Notice Sheet (manual close only via X or backdrop) */
.login-required-sheet {
  padding: 24px 16px;
  text-align: center;
}

.login-required-sheet h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.login-required-sheet p {
  margin: 0;
  color: var(--tx2);
  font-size: 15px;
}

/* Action button inside the login notice (when a continuation callback is provided) */
.login-required-sheet .px-login-proceed {
  margin-top: 18px;
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== LANDING PAGE ========== */
.px-landing {
  padding: 60px 20px 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.px-landing-hero {
  margin-bottom: 48px;
}

.px-landing-logo {
  margin-bottom: 20px;
}

.px-landing-logo svg {
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.px-landing-title {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1.8px;
  margin: 0 0 8px;
  line-height: 1.05;

  /* Experimental weavy color loop — matches the new colored logo */
  background: linear-gradient(
    115deg,
    #a78bfa,
    #6bcb77,
    #4d96ff,
    #ffd93d,
    #ff6b6b,
    #a78bfa,
    #6bcb77,
    #4d96ff
  );
  background-size: 450% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: photoXedWeave 9s linear infinite;
}

.px-landing-subtitle {
  font-size: 17px;
  color: var(--tx2);
  line-height: 1.35;
  margin: 0;
}

/* New header row for icon + right-side pill (for in-app landing) */
.px-future-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.px-future-card-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex-shrink: 0;
  margin-bottom: 0; /* handled by .px-future-card-header now */
}

/* Per-card icon + pill border colors (matching each other) */
.px-futuristic-cards .px-future-card:nth-child(1) .px-future-card-icon { color: #4d96ff; }
.px-futuristic-cards .px-future-card:nth-child(1) .px-future-card-pill { border-color: #4d96ff; }

.px-futuristic-cards .px-future-card:nth-child(2) .px-future-card-icon { color: #ffd93d; }
.px-futuristic-cards .px-future-card:nth-child(2) .px-future-card-pill { border-color: #ffd93d; }

.px-futuristic-cards .px-future-card:nth-child(3) .px-future-card-icon { color: #a78bfa; }
.px-futuristic-cards .px-future-card:nth-child(3) .px-future-card-pill { border-color: #a78bfa; }

/* Pill tags on the right of the cards */
.px-future-card-pill {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  color: var(--tx2);
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
  align-self: flex-start;
  margin-left: 8px;
}

.px-future-card-body {
  padding: 16px 0;
}

.px-future-card-divider {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 12px 0;
  opacity: 0.45;
}

.px-future-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.px-future-card-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.px-future-card-stat .stat-icon {
  width: 14px;
  height: 14px;
  opacity: 0.75;
  margin-bottom: 6px;
  color: var(--tx3);
}

.px-future-card-stat .stat-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--tx);
  line-height: 1.1;
}

.px-future-card-stat .stat-label {
  font-size: 9px;
  color: var(--tx3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 1px;
}

.px-landing-cta {
  width: 100%;
  max-width: 320px;
}

/* .px-landing-hint styling lives in landing.css for the main landing page */

.px-import-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  color: var(--tx);
  margin-top: var(--sp-3);
}

/* Delightful hidden surprises — ONE single continuous glide for THANK YOU */
.thank-you-evaporate {
  position: fixed;
  top: 9%;
  left: 50%;
  transform: translate(-50%, 0) scale(0.5);
  pointer-events: none;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  z-index: 999999;
  white-space: nowrap;
  will-change: transform, opacity, filter, background-position;
  background: linear-gradient(
    90deg,
    #a78bfa,
    #6bcb77,
    #4d96ff,
    #ffd93d,
    #ff6b6b,
    #a78bfa
  );
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: thankYouGlide 1750ms linear forwards;
}

@keyframes thankYouGlide {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.35);
    filter: blur(4px);
    background-position: 0% 50%;
  }
  12% {
    opacity: 1;
    transform: translate(-50%, 7vh) scale(1.05);
    filter: blur(0px);
    background-position: 28% 50%;
  }
  68% {
    opacity: 1;
    transform: translate(-50%, 49vh) scale(2.35);
    filter: blur(0px);
    background-position: 72% 50%;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 82vh) scale(1.6);
    filter: blur(15px);
    background-position: 100% 50%;
  }
}

.px-snack {
  position: fixed;
  bottom: calc(var(--segbar-height) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--bg-glass-strong);
  backdrop-filter: saturate(200%) blur(32px);
  -webkit-backdrop-filter: saturate(200%) blur(32px);
  border: 1px solid var(--glass-border);
  color: var(--tx);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  pointer-events: none;
  z-index: 1100;
  white-space: nowrap;
}

.px-snack.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}