/* Shared Components */

/* Inputs */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  height: auto;
  line-height: 1.5;
  /* Flexible height using padding and explicit line-height prevents text clipping */
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background-color: #fff;
  color: var(--font-color);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Only select elements get the dropdown chevron */
select {
  padding-right: 40px;
  background-image: url("/img/icons/outline/chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
}

/* Global Search Component Styles */
.search-wrapper {
  position: relative;
  width: 100%;
  /* Ensure the wrapper fills the given space */
}

/* For forms containing searches */
.search-wrapper form {
  position: relative;
  display: flex;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--font-color-muted, #888);
  pointer-events: none;
  z-index: 2;
}

/* Make sure text doesn't overlap with the absolute icon */
input.video-search-input,
.search-wrapper input[type="search"] {
  padding-left: 46px !important;
}

/* Checkboxes */
input[type="checkbox"] {
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 1px solid transparent;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition:
    all 0.2s ease,
    transform 0.2s ease;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #000;
}

.btn-dark {
  background-color: var(--color-dark, #000);
  color: #fff;
  border: none;
}

.btn-dark:hover {
  background-color: var(--color-darker, #0e0913);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-dark img,
.btn-primary img {
  filter: invert(1);
}

.btn-secondary {
  background-color: #fff;
  color: #000;
  border: none;
}

.btn-ghost {
  background-color: transparent;
  color: var(--font-color);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--font-color);
}

.btn-outline:hover {
  border-color: var(--primary-color);
}

/* Action Button (Icon) */
.action-btn {
  background: none;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  /* Rounded rectangle */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--font-color);
  transition:
    transform 0.2s,
    background 0.2s;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
}

.action-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: scale(1.05);
}

.action-btn:active {
  transform: scale(0.95);
}

.action-icon {
  width: 24px;
  height: 24px;
  transition: filter 0.2s;
}

/* On hover/active, maybe change icon color? Controlled by JS or CSS */
.action-btn.active .action-icon {
  filter: invert(42%) sepia(93%) saturate(1352%) hue-rotate(87deg) brightness(119%) contrast(119%);
  /* Example accent filter */
}

/* Badges & Tags */
.social-links-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.badge,
.tag,
.social-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: #fff;
  border: 1px solid var(--border-color);
  color: var(--font-color) !important;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
}

.badge:hover,
.tag:hover,
.social-tag:hover {
  border-color: var(--color-dark);
  transform: translateY(-2px);
  background-color: #fff;
  color: var(--color-dark) !important;
}

.badge.active {
  background-color: var(--color-dark);
  border-color: var(--color-dark);
  color: #fff !important;
}

.badge-count {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 6px;
  border-radius: 99px;
  font-size: 0.75rem;
  margin-left: 6px;
  font-weight: normal;
}

/* Links */
a.link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

a.link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.text-link {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.text-link:hover {
  color: var(--primary-color);
}

/* Shared Language Dropdown Component */
.lang-selector {
  max-width: 220px;
  margin: 0 auto;
}

.lang-select {
  border: 1px solid var(--border-color);
  background-color: #fff;
  color: var(--color-dark);
  height: auto;
  line-height: 1.5;
  padding: 11px 40px 11px 12px;
  box-sizing: border-box;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("/img/icons/outline/chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

/* 3. Membership Section */
.membership-section {
  padding: 40px 20px;
  background-image: linear-gradient(135deg, var(--gray-1), #FFB6FF, var(--gray-1));
  text-align: center;
  position: relative;
  z-index: 2;
  /* Box Shadow "above the top" to appear elevated */
  box-shadow: var(--section-shadow-top), var(--section-shadow-bottom);
}

.section-header {
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  font-weight: 800;
  color: var(--color-dark);
}

.membership-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  max-width: 450px;
  margin: 0 auto;
}

@media (min-width: 1300px) {
  .membership-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
  }
}

.membership-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid #fff;
  display: flex;
  flex-direction: column;
}

.membership-card.recommended {
  border: 2px solid var(--primary-color);
  position: relative;
}

.card-header {
  padding: 30px 30px 10px;
  background: #fff;
  /* border-bottom: 1px solid #eee; Remove border for cleaner look */
  text-align: center;
}

.card-header h3 {
  font-size: 0.85rem;
  /* Smaller text */
  font-weight: 400;
  /* Softer weight */
  margin-top: 15px;
  color: #666;
  /* Subtler color */
}

.badge {
  background: var(--primary-color);
  color: #fff;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-top: 10px;
  display: inline-block;
}

.pricing-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.price-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #eee;
}

.price-option.highlight {
  background: rgba(var(--primary-color-rgb), 0.1);
  border-color: var(--primary-color);
}

.features {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  text-align: left;
}

.features li {
  padding: 8px 0;
  border-bottom: 1px solid #f9f9f9;
}

.features li::before {
  content: '✓';
  color: green;
  margin-right: 10px;
}

.card-body {
  padding: 20px 30px 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Shared styles */
/* Brand Icons Area */
.brand-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.brand-icons img {
  height: 24px;
  object-fit: contain;
}

.brand-icons .row-break {
  flex-basis: 100%;
  height: 0;
}

/* Secreto Mio Logo Text */
.card-brand-logo {
  font-family: 'Secreto Mio', cursive;
  font-size: 2.5rem;
  color: #ffb6ff;
  /* Better visibility */
  text-align: center;
  line-height: 1;
}

/* Pricing Display */
.pricing-display {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #555;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s;
}

.price-row.selectable {
  cursor: pointer;
  border-left: 3px solid transparent;
}

.price-row.selectable:hover {
  background: rgba(255, 182, 255, 0.08);
}

.price-row.selectable.selected {
  background: rgba(255, 182, 255, 0.12);
  border-left-color: var(--primary-color, #ff69b4);
}

.price-row strong {
  color: #000;
  font-size: 1.1rem;
}

/* Features List with Icons */
.features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  text-align: left;
}

.features-list li {
  padding: 8px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: #333;
}

.features-list li::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 2px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.gray-cross {
  color: #999;
}

.gray-cross::before {
  -webkit-mask-image: url('/img/icons/outline/x.svg');
  mask-image: url('/img/icons/outline/x.svg');
  background-color: #999 !important;
}

.pink-check {
  color: #333;
}

.pink-check::before {
  -webkit-mask-image: url('/img/icons/outline/check.svg');
  mask-image: url('/img/icons/outline/check.svg');
  background-color: var(--primary-color) !important;
  /* Brand Pink */
}

/* Add to Cart Button */
.add-to-cart-btn {
  margin-top: auto;
  border-radius: 8px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: normal;
  padding: 12px;
}

.add-to-cart-btn .icon-sm {
  flex-shrink: 0;
}

.full-width {
  width: 100%;
}

.platform-link-buttons-large {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.platform-link-a {
  transition: color 0.2s ease;
}

.platform-link-a:hover {
  color: var(--color-dark) !important;
}

.btn-platform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.btn-platform:hover {
  background: #eee;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.platform-btn-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ───────────────────────────────────────────────────────────────
   Shared "You must be logged in to comment" prompt.
   Used inside comment sections on /watch, /models, /blog, /swipe,
   /feed (drawer). Previously each page used ad-hoc inline styles
   that drifted apart over time; this class is the single source
   of truth so the look stays consistent.
   ─────────────────────────────────────────────────────────────── */
.comments-login-prompt {
  padding: 15px;
  margin-top: 15px;
  background: var(--bg-hover, var(--bg-secondary, #f5f5f5));
  border-radius: 6px;
  text-align: center;
}

.comments-login-prompt p {
  margin: 0;
  color: var(--font-color-muted, var(--font-muted, #888));
  font-size: 0.9rem;
}

.comments-login-prompt a {
  color: var(--primary-color, var(--color-primary, #e91e63));
  font-weight: 600;
  text-decoration: none;
}

.comments-login-prompt a:hover {
  text-decoration: underline;
}

/* ── Deep-link comment highlight ───────────────────────────────────────────
 * Applied by assets/js/shared/comment-highlight.js when a user arrives on a
 * page via `<post>?comment_id=<events.id>` (from the /account Activity tab).
 * The @keyframes runs once — the JS also removes the class after 3.2 s so
 * subsequent clicks from the same session can re-trigger the animation.
 */
@keyframes comment-highlight-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(233, 30, 99, 0.55);
    background-color: rgba(233, 30, 99, 0.12);
  }

  40% {
    box-shadow: 0 0 0 6px rgba(233, 30, 99, 0.12);
    background-color: rgba(233, 30, 99, 0.09);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(233, 30, 99, 0);
    background-color: transparent;
  }
}

.comment-item--highlighted {
  border-radius: 8px;
  animation: comment-highlight-pulse 3s ease-out 1;
  scroll-margin-top: 80px;
  /* keep the target below the sticky nav */
}

@media (prefers-reduced-motion: reduce) {
  .comment-item--highlighted {
    animation: none;
    background-color: rgba(233, 30, 99, 0.08);
  }
}

/* ─────────────────────────────────────────────────────────────
   Shared Comments UI
   --------------------------------------------------------------
   Canonical card + input markup used by /watch, /models, /blog
   (and the watch-comments-section on /watch/:id). Previously each
   page shipped its own near-duplicate rules; this is the single
   source of truth consumed by src/watch.js, src/models.js and
   src/blogs.js. Page-specific scopes (.model-comments-section,
   .blog-comments-section, .watch-comments-section) tighten
   spacing/size only — the structural rules live here.

   Layout contract:
       .comment-item
         └── .comment-avatar?          (optional 40x40 circle)
         └── .comment-content
               ├── .comment-user       (pink bold)
               ├── .comment-text       (body copy)
               └── .comment-time       (muted timestamp)
   ───────────────────────────────────────────────────────────── */
.comment-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 12px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    flex-shrink: 0;
}

.comment-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comment-user {
    font-weight: bold;
    color: var(--primary-color, #e91e63);
}

.comment-text {
    line-height: 1.4;
    color: var(--font-color);
    word-break: break-word;
    overflow-wrap: break-word;
}

.comment-time {
    font-size: 0.8rem;
    color: #888;
}

.comment-input-area {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.comment-input {
    flex: 1;
    padding: 12px;
    border-radius: 25px;
    border: 1px solid #ccc;
    background: #fff;
    color: #000;
}

.comment-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Tighten the card on small viewports so long-form text stays readable. */
@media (max-width: 900px) {
    .comment-item {
        padding: 15px;
    }
}

/* Embed Links Overlay */
.embed-links-overlay {
    position: absolute;
    right: 16px;
    top: 10px;
    z-index: 10;
    display: flex;
    gap: 12px;
    opacity: 0.6;
}

.embed-links-overlay a {
    color: inherit;
    text-decoration: none;
}

.embed-links-overlay a:hover {
    opacity: 0.8;
}

.embed-links-overlay img {
    width: 24px;
    height: 24px;
    display: block;
}