/* Highlight Sharing Styles */

/* Share modal container */
.highlight-share-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.highlight-share-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Share card preview container */
.highlight-share-card-container {
  width: 90%;
  max-width: 500px;
  background-color: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 10000;
}

/* Card preview */
.highlight-share-preview {
  width: 100%;
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f0e6d2 0%, #e5d1a9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

.highlight-share-card {
  width: 100%;
  height: 100%;
  padding: 40px;
  display: flex;
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, #f0e6d2 0%, #e5d1a9 100%);
  background-clip: padding-box;  
  border: 10px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) inset;
  box-sizing: border-box;
}

/* Wisdom title */
.highlight-share-wisdom-title {
  font-family: 'Palatino', 'Palatino Linotype', 'Book Antiqua', serif;
  text-align: center;
  color: #555;
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  opacity: 0.80;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  position: relative;
}

.highlight-share-wisdom-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.2);
  margin: 12px auto 0;
}

/* Quote text */
.highlight-share-quote {
  font-family: 'Palatino', 'Palatino Linotype', 'Book Antiqua', serif;
  text-align: center;
  color: #333;
  margin-bottom: 24px;
  font-weight: 500;
  max-width: 90%;
  position: relative;
  transition: font-size 0.3s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 10px 20px;
  z-index: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Different sizes based on word count */
.highlight-share-quote.very-small-quote {
  font-size: 28px;
  line-height: 1.1;
}

.highlight-share-quote.small-quote {
  font-size: 28px;
  line-height: 1.1;
}

.highlight-share-quote.medium-quote {
  font-size: 28px;
  line-height: 1.4;
}

.highlight-share-quote.large-quote {
  font-size: 20px;
  line-height: 1.4;
  max-height: 60%;
}

/* Additional sizes for longer quotes */
.highlight-share-quote.x-large-quote {
  font-size: 16px;
  line-height: 1.4;
  max-height: 65%;;
}

.highlight-share-quote.xx-large-quote {
  font-size: 14px;
  line-height: 1.4;
  max-height: 70%;
}

.highlight-share-quote.xxx-large-quote {
  font-size: 12px;
  line-height: 1.4;
  max-height: 75%;
  overflow-y: auto;
}

.highlight-share-quote::before {
  content: '';
  position: absolute;
  width: 33px;
  height: 23px;
  background-image: url("data:image/svg+xml,%3Csvg width='33' height='23' viewBox='0 0 33 23' fill='rgba(0, 0, 0, 0.1)' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M32.0011 4.7203L30.9745 0C23.5828 0.33861 18.459 3.41404 18.459 12.4583V22.8687H31.3725V9.78438H26.4818C26.4819 6.88236 28.3027 5.17551 32.0011 4.7203Z' /%3E%3Cpath d='M13.5421 4.7203L12.5155 0C5.12386 0.33861 0 3.41413 0 12.4584V22.8687H12.914V9.78438H8.02029C8.02029 6.88236 9.84111 5.17551 13.5421 4.7203Z' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  line-height: 1;
  top: -20px;
  left: -30px;
}

/* .highlight-share-quote::after {
  content: '';
  position: absolute;
  width: 33px;
  height: 23px;
  background-image: url("data:image/svg+xml,%3Csvg width='33' height='23' viewBox='0 0 33 23' fill='rgba(0, 0, 0, 0.1)' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M32.0011 4.7203L30.9745 0C23.5828 0.33861 18.459 3.41404 18.459 12.4583V22.8687H31.3725V9.78438H26.4818C26.4819 6.88236 28.3027 5.17551 32.0011 4.7203Z' /%3E%3Cpath d='M13.5421 4.7203L12.5155 0C5.12386 0.33861 0 3.41413 0 12.4584V22.8687H12.914V9.78438H8.02029C8.02029 6.88236 9.84111 5.17551 13.5421 4.7203Z' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  line-height: 1;
  bottom: -30px;
  right: -10px;
  transform: rotate(180deg);
} */

/* Mentor name */
.highlight-share-mentor {
  font-family: 'Palatino', 'Palatino Linotype', 'Book Antiqua', serif;
  font-size: 16px;
  color: #555;
  position: relative;
  padding: 10px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* Removed auto dash to allow JS to control dash display */
/* .highlight-share-mentor::before {
  content: '— ';
} */

/* Logo */
.highlight-share-logo {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 35px;
  height: auto;
  opacity: 0.85;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

/* Logo text */
.highlight-share-logo-text {
  position: absolute;
  bottom: 20px;
  right: 65px;
  font-family: 'Palatino', 'Palatino Linotype', 'Book Antiqua', serif;
  font-size: 16px;
  font-weight: bold;
  color: #555;
  opacity: 0.85;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* Decorative elements */
.highlight-share-decorative-element {
  position: absolute;
  width: 30px;
  height: 30px;
  opacity: 0.3;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  transform: rotate(45deg);
}

.highlight-share-decorative-element.top-left {
  top: 20px;
  left: 20px;
  background: radial-gradient(circle, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 70%);
}

.highlight-share-decorative-element.top-right {
  top: 20px;
  right: 20px;
  background: radial-gradient(circle, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 70%);
}

.highlight-share-decorative-element.bottom-left {
  bottom: 60px;
  left: 20px;
  background: radial-gradient(circle, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 70%);
}

.highlight-share-decorative-element.bottom-right {
  bottom: 60px;
  right: 20px;
  background: radial-gradient(circle, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 70%);
}

/* Controls section */
.highlight-share-controls {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: #f8f8f8;
  border-top: 1px solid #eee;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

/* Share buttons */
.highlight-share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.highlight-share-button {
  padding: 10px;
  border-radius: 50%;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  width: 42px;
  height: 42px;
  position: relative;
}

.highlight-share-download {
  background-color: #A855F7;
  color: white;
}

.highlight-share-download:hover {
  background-color: #9333EA;
}

/* Confirmation Modal */
.letter-confirmation-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.letter-confirmation-modal.active {
  opacity: 1;
  visibility: visible;
}

.letter-confirmation-modal-center {
  background-color: white;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.letter-confirmation-modal-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
}

.letter-confirmation-modal-message {
  font-size: 16px;
  margin-bottom: 24px;
  color: #555;
  line-height: 1.5;
}

.letter-confirmation-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.letter-confirmation-modal-button {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border: none;
}

.letter-confirmation-modal-cancel {
  background-color: #f3f4f6;
  color: #4b5563;
}

.letter-confirmation-modal-cancel:hover {
  background-color: #e5e7eb;
}

.letter-confirmation-modal-confirm {
  background-color: #A855F7;
  color: white;
}

.letter-confirmation-modal-confirm:hover {
  background-color: #9333EA;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast message styles - only used if main.css styles are not available */
#inspirationResponseModal .toast-message {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #8b5cf6;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  max-width: 80%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#inspirationResponseModal .toast-message.show {
  opacity: 1;
  visibility: visible;
}

/* Only apply these styles if not in the modal */
.toast-message:not(#inspirationResponseModal .toast-message) {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #8b5cf6;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  max-width: 80%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-message.show:not(#inspirationResponseModal .toast-message) {
  opacity: 1;
  visibility: visible;
}

@media only screen and (max-width: 760px) {
  .toast-message {
    width: 90%;
    font-size: 13px;
    padding: 10px 16px;
  }
}

/* X (Twitter) */
.highlight-share-x {
  background-color: #000000;
  color: white;
}

.highlight-share-x:hover {
  background-color: #333333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Instagram */
.highlight-share-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: white;
}

.highlight-share-instagram:hover {
  opacity: 0.9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Threads */
.highlight-share-threads {
  background-color: #000000;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.highlight-share-threads img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.highlight-share-threads:hover {
  background-color: #333333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* TikTok */
.highlight-share-tiktok {
  background-color: #000000;
  color: white;
}

.highlight-share-tiktok:hover {
  background-color: #333333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* LinkedIn */
.highlight-share-linkedin {
  background-color: #0077B5;
  color: white;
}

.highlight-share-linkedin:hover {
  background-color: #006699;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.highlight-share-close {
  background-color: transparent;
  color: #666;
  border: 1px solid #ddd;
}

.highlight-share-close:hover {
  background-color: #f0f0f0;
}

/* Highlight options menu */
.highlight-options-menu {
  position: absolute;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  z-index: 10000;
  min-width: 150px;
  margin-top: 0; /* Remove margin to position exactly at the highlight */
  border: 1px solid rgba(0, 0, 0, 0.1);
  transform-origin: top left;
  animation: menuAppear 0.15s ease-out;
}

@keyframes menuAppear {
  from { 
    opacity: 0; 
    transform: translateY(-5px) scale(0.98);
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
}

.highlight-option-item {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #333;
}

.highlight-option-item:hover {
  background-color: #f5f5f5;
  color: #000;
}

.highlight-option-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.highlight-option-share {
  color: #A855F7;
}

.highlight-option-remove {
  color: #ef4444;
}
