/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

 /*
 * app/assets/stylesheets/application.css
 *= require inter-font
 *= require_self
 */

 .prose h1 {
  font-size: 2.25rem;
}
.prose h2 {
  font-size: 1.875rem;
}
.prose h3 {
  font-size: 1.5rem;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}
  
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

trix-toolbar {
  position: sticky;
  top: 0px;
  z-index: 1000;
  padding: 0px;
}

trix-editor#post_content {
  min-height: 66px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  box-sizing: border-box;
}

.short-post .trix-button-group--text-tools,
.short-post .trix-button-group--block-tools {
  display: none !important;
}

.trix-button-group--file-tools {
  margin-left: 0 !important;
}

.trix-button-group--block-tools {
  display: none !important;
}

.lexxy-content figure figcaption {
  display: none;
}

.lexxy-content figure img {
  padding-top: 10px !important;
}

/* Fix: improve click area after image upload in Lexxy editor */
lexxy-editor action-text-attachment {
  cursor: text;
  pointer-events: none;
}
lexxy-editor action-text-attachment img {
  pointer-events: auto;
  cursor: default;
}
lexxy-editor .lexxy-editor__content {
  cursor: text;
  padding-bottom: 1.5em;
}

/* Fix Safari text-wrap: pretty causing right margin */
.lexxy-content p,
.lexxy-content ul,
.lexxy-content ol,
.lexxy-content dl,
.lexxy-content blockquote {
  text-wrap: wrap !important;
}

a.show-more {
  color: var(--color-info);
  text-decoration: none;
}

a.show-more:hover,
a.show-more:active {
  color: var(--color-primary);
  text-decoration: underline;
}

div.lexxy-content a:not(.post_link) {
  color: var(--color-info);
  text-decoration: none;
}

div.lexxy-content a:not(.post_link):hover,
div.lexxy-content a:not(.post_link):active {
  text-decoration: underline;
}

div.lexxy-content a:not(.post_link):hover {
  color: var(--color-primary);
}

div.lexxy-content a:not(.post_link):active {
  color: var(--color-primary);
}

div.lexxy-content a:not(.post_link):focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

a.blue {
  color: var(--color-info);
  text-decoration: none;
}

a.blue:hover,
a.blue:active {
  text-decoration: underline;
}

a.blue:hover {
  color: var(--color-primary);
}

a.blue:active {
  color: var(--color-primary);
}

a.blue:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

#unread-count {
  transform: translate(50%, -50%);
}

/* like animate */
.animate-bounce {
  animation: bounce 0.5s ease-in-out;
}

.like-fade-out {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Hotwire app */
.content { margin-top: 56px; }
.header { background-color: var(--color-base-100); }
.header input { color: var(--color-base-content); border-color: var(--color-base-300); }

/* Logo size */
.logo { width: 55px !important; height: 45px !important; }

/* Vip post */
.paywall {
  position: relative;
  min-height: 500px;
  border-radius: 16px;
  overflow: hidden;
}

.preview {
  filter: blur(4px);
  pointer-events: none;
  min-height: 400px;
  max-height: 500px;
  overflow: hidden;
}

.paywall-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.7) 100%);
  border-radius: inherit;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  min-height: 500px;
}

.unlock-btn {
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  color: white;
  border: none;
  padding: 1.25rem 3rem;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(0, 102, 255, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 280px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.unlock-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 50px rgba(0, 102, 255, 0.5);
}

/* Mobile payment UI width optimization */
@media (max-width: 640px) {
  .paywall-overlay {
    padding: 1rem 0;
  }
  
  .unlock-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 1rem 1rem;
    font-size: 1rem;
    box-sizing: border-box;
  }
  
  .payment-card {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
    box-sizing: border-box;
  }
  
  .payment-card .payment-btn {
    min-width: 0;
    width: 100%;
    padding: 1rem 0.75rem;
    font-size: 0.95rem;
    box-sizing: border-box;
    white-space: nowrap;
  }
  
  .payment-wallet-hint {
    padding: 0;
    text-align: center;
    width: 100%;
  }
}

.paid-content-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: oklch(var(--wa) / 0.15);
  border: 1px solid oklch(var(--wa) / 0.4);
  border-radius: 9999px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.unlocked-content-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: oklch(var(--su) / 0.15);
  border: 1px solid oklch(var(--su) / 0.4);
  border-radius: 9999px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Payment Card */
.payment-card {
  background-color: oklch(var(--b2));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 28px;
  padding: 2.5rem 2.5rem;
  max-width: 480px;
  width: 95%;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.4);
  text-align: center;
  border: 1px solid oklch(var(--bc) / 0.1);
}

.payment-card-disabled {
  background-color: oklch(var(--b2));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
}

.payment-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: oklch(var(--bc));
  line-height: 1;
  margin-bottom: 0.5rem;
}

.payment-currency {
  font-size: 1rem;
  font-weight: 600;
  color: oklch(var(--bc) / 0.6);
  margin-left: 0.25rem;
}

.payment-recipient {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  background-color: oklch(var(--b3));
  border-radius: 12px;
}

.recipient-avatar {
  flex-shrink: 0;
}

.recipient-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.recipient-label {
  font-size: 0.75rem;
  color: oklch(var(--bc) / 0.5);
}

.recipient-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: oklch(var(--bc));
}

.payment-wallet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: oklch(var(--bc) / 0.5);
  margin-bottom: 1.5rem;
}

.payment-wallet code {
  background-color: oklch(var(--b3));
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.75rem;
}

.payment-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  background-color: oklch(var(--p));
  color: oklch(var(--pc));
}

.payment-btn:hover {
  background-color: oklch(var(--pf));
}

.payment-status {
  min-height: 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: oklch(var(--bc) / 0.6);
}

.payment-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  background-color: oklch(var(--wa) / 0.15);
  border-radius: 12px;
  font-size: 0.8rem;
  color: oklch(var(--bc));
  text-align: left;
  line-height: 1.5;
  border: 1px solid oklch(var(--wa) / 0.3);
}

.payment-wallet-hint {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: oklch(var(--bc) / 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

lexxy-toolbar .lexxy-editor__toolbar-dropdown summary {
  list-style: none !important;
  list-style-type: none !important;
}

lexxy-toolbar .lexxy-editor__toolbar-dropdown summary::-webkit-details-marker {
  display: none !important;
}

lexxy-toolbar .lexxy-editor__toolbar-dropdown {
  display: inline-flex !important;
  align-items: center !important;
}

lexxy-toolbar .lexxy-editor__toolbar-dropdown summary {
  display: flex !important;
  align-items: center !important;
}