/* ==========================================================================
   PropertyMe Blog Marketing Plugin
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Inline Blog CTA
   -------------------------------------------------------------------------- */

.pme-inline-cta {
  margin: 3rem 0 0;
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, #f8f9fc 0%, #eef1f8 100%);
  border-radius: 12px;
  text-align: center;
}

.pme-inline-cta__inner {
  max-width: 560px;
  margin: 0 auto;
}

.pme-inline-cta__icon {
  margin-bottom: 1rem;
}

.pme-inline-cta__title {
  font-family: "Nunito Sans", sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.pme-inline-cta__subtitle {
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.pme-inline-cta__form {
  width: 100%;
}

.pme-inline-cta__fields {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pme-inline-cta__input {
  flex: 1 1 160px;
  padding: 0.625rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.pme-inline-cta__input:focus {
  border-color: #F2994A;
}

.pme-inline-cta__button {
  padding: 0.625rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.pme-inline-cta__error {
  width: 100%;
  color: #e74c3c;
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
  text-align: center;
}

.pme-inline-cta__success {
  text-align: center;
  padding: 1rem 0;
}

.pme-inline-cta__success svg {
  margin-bottom: 1rem;
}

@media (max-width: 576px) {
  .pme-inline-cta {
    padding: 1.5rem 1rem;
  }

  .pme-inline-cta__fields {
    flex-direction: column;
  }

  .pme-inline-cta__input {
    flex: 1 1 100%;
  }

  .pme-inline-cta__button {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   2. Social Sharing Bar
   -------------------------------------------------------------------------- */

.pme-social-sharing {
  position: fixed;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 100;
}

.pme-social-sharing__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e0e0e0;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  padding: 0;
  line-height: 1;
}

.pme-social-sharing__btn:hover {
  background: #f5f5f5;
  border-color: #ccc;
  color: #333;
  transform: scale(1.1);
}

.pme-social-sharing__btn--linkedin:hover {
  color: #0077B5;
  border-color: #0077B5;
}

.pme-social-sharing__btn--facebook:hover {
  color: #1877F2;
  border-color: #1877F2;
}

.pme-social-sharing__btn--twitter:hover {
  color: #000;
  border-color: #000;
}

.pme-social-sharing__btn--email:hover {
  color: #F2994A;
  border-color: #F2994A;
}

.pme-social-sharing__btn--copy:hover {
  color: #27AE60;
  border-color: #27AE60;
}

/* Mobile: bottom bar */
@media (max-width: 991px) {
  .pme-social-sharing {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    transform: none;
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
  }
}

/* --------------------------------------------------------------------------
   3. Scroll-Triggered Popup
   -------------------------------------------------------------------------- */

.pme-scroll-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pme-scroll-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.pme-scroll-popup__card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: pmePopupSlideIn 0.3s ease-out;
}

@keyframes pmePopupSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pme-scroll-popup__close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}

.pme-scroll-popup__close:hover {
  color: #333;
}

.pme-scroll-popup__content {
  text-align: center;
}

.pme-scroll-popup__title {
  font-family: "Nunito Sans", sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.pme-scroll-popup__subtitle {
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.pme-scroll-popup__form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.pme-scroll-popup__input {
  padding: 0.625rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.pme-scroll-popup__input:focus {
  border-color: #F2994A;
}

.pme-scroll-popup__button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.pme-scroll-popup__error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

.pme-scroll-popup__success {
  padding: 1rem 0;
}

.pme-scroll-popup__success svg {
  margin-bottom: 1rem;
}

@media (max-width: 576px) {
  .pme-scroll-popup__card {
    padding: 1.5rem;
    margin: 0 1rem;
  }
}

/* --------------------------------------------------------------------------
   4. Reading Progress Bar
   -------------------------------------------------------------------------- */

#pme-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 10001;
  pointer-events: none;
}

#pme-reading-progress-bar {
  height: 100%;
  width: 0;
  background: #F2994A;
  transition: width 0.1s linear;
}

/* --------------------------------------------------------------------------
   5. Reading Time
   -------------------------------------------------------------------------- */

.pme-reading-time {
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.875rem;
  color: #888;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

/* --------------------------------------------------------------------------
   6. Table of Contents
   -------------------------------------------------------------------------- */

.pme-toc {
  background: #f8f9fc;
  border: 1px solid #e8ebf0;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.pme-toc__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.pme-toc__title {
  font-family: "Nunito Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #333;
}

.pme-toc__chevron {
  transition: transform 0.2s ease;
  color: #666;
}

.pme-toc__toggle[aria-expanded="false"] .pme-toc__chevron {
  transform: rotate(-90deg);
}

.pme-toc__list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  counter-reset: toc-counter;
}

.pme-toc__list[hidden] {
  display: none;
}

.pme-toc__item {
  counter-increment: toc-counter;
  margin-bottom: 0.375rem;
}

.pme-toc__item--h3 {
  padding-left: 1.25rem;
}

.pme-toc__link {
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.9rem;
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  padding: 0.125rem 0;
}

.pme-toc__link::before {
  content: counter(toc-counter) ". ";
  color: #F2994A;
  font-weight: 600;
}

.pme-toc__link:hover,
.pme-toc__link.pme-toc__link--active {
  color: #F2994A;
}

/* --------------------------------------------------------------------------
   7. Content Gate
   -------------------------------------------------------------------------- */

.pme-content-gate {
  position: relative;
  margin: 1.5rem 0;
}

.pme-content-gate__preview {
  position: relative;
  max-height: 120px;
  overflow: hidden;
}

.pme-content-gate__blurred {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

.pme-content-gate__preview::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, #fff);
}

.pme-content-gate__lock {
  background: #f8f9fc;
  border: 1px solid #e8ebf0;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  margin-top: -1rem;
  position: relative;
}

.pme-content-gate__lock-inner {
  max-width: 400px;
  margin: 0 auto;
}

.pme-content-gate__title {
  font-family: "Nunito Sans", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #333;
  margin: 0.75rem 0 0.375rem;
}

.pme-content-gate__subtitle {
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.875rem;
  color: #666;
  margin: 0 0 1rem;
}

.pme-content-gate__form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pme-content-gate__input {
  flex: 1 1 200px;
  padding: 0.625rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.pme-content-gate__input:focus {
  border-color: #F2994A;
}

.pme-content-gate__button {
  padding: 0.625rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.pme-content-gate__error {
  width: 100%;
  color: #e74c3c;
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
}

/* Unlocked state */
.pme-content-gate--unlocked .pme-content-gate__preview,
.pme-content-gate--unlocked .pme-content-gate__lock {
  display: none;
}

.pme-content-gate--unlocked .pme-content-gate__content {
  display: block !important;
}

@media (max-width: 576px) {
  .pme-content-gate__form {
    flex-direction: column;
  }

  .pme-content-gate__button {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   8. Related Posts CTA Card
   -------------------------------------------------------------------------- */

.pme-related-cta-card {
  height: 100%;
  display: flex;
}

.pme-related-cta-card__inner {
  background: linear-gradient(135deg, #f8f9fc 0%, #eef1f8 100%);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.pme-related-cta-card__title {
  font-family: "Nunito Sans", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #333;
  margin: 0.75rem 0 0.375rem;
  line-height: 1.3;
}

.pme-related-cta-card__subtitle {
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.875rem;
  color: #666;
  margin: 0 0 1rem;
  line-height: 1.4;
}

.pme-related-cta-card__button {
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   8. Content Upgrade
   -------------------------------------------------------------------------- */

.pme-content-upgrade {
  margin: 2.5rem 0;
}

.pme-content-upgrade__card {
  background: linear-gradient(135deg, #f8f9fc 0%, #eef1f8 100%);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid #e2e6ee;
}

.pme-content-upgrade__file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #dde1ea;
}

.pme-content-upgrade__file-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e6ee;
}

.pme-content-upgrade__file-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pme-content-upgrade__file-name {
  font-family: "Nunito Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  word-break: break-word;
}

.pme-content-upgrade__file-detail {
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.8125rem;
  color: #888;
}

.pme-content-upgrade__title {
  font-family: "Nunito Sans", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 0.25rem;
}

.pme-content-upgrade__subtitle {
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.9375rem;
  color: #666;
  margin: 0 0 1rem;
}

.pme-content-upgrade__form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pme-content-upgrade__input {
  flex: 1 1 200px;
  padding: 0.625rem 1rem;
  border: 1px solid #ccd0d4;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-family: "Nunito Sans", sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.pme-content-upgrade__input:focus {
  border-color: #F2994A;
  box-shadow: 0 0 0 2px rgba(242, 153, 74, 0.15);
}

.pme-content-upgrade__button {
  flex-shrink: 0;
}

.pme-content-upgrade__error {
  width: 100%;
  color: #d63031;
  font-size: 0.8125rem;
  margin: 0.5rem 0 0;
}

.pme-content-upgrade__download {
  text-align: center;
  padding-top: 0.5rem;
}

.pme-content-upgrade__download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
}

.pme-content-upgrade__download-meta {
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.8125rem;
  color: #888;
  margin: 0.5rem 0 0;
}

@media (max-width: 575.98px) {
  .pme-content-upgrade__form {
    flex-direction: column;
  }

  .pme-content-upgrade__button {
    width: 100%;
  }
}
