/* Sharing Component Styles */

/* Sharing button and container */
.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  color: #495057;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.share-button:hover {
  background-color: #e9ecef;
  transform: translateY(-2px);
}

.share-button svg {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

.share-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.share-modal.show {
  opacity: 1;
}

.share-modal-content {
  width: 90%;
  max-width: 500px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 20px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.share-modal.show .share-modal-content {
  transform: translateY(0);
}

.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.share-modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.share-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  line-height: 1;
}

.share-modal-close:hover {
  color: #333;
}

/* Social sharing options */
.social-sharing-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.social-sharing-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.social-sharing-button:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.social-sharing-button svg {
  width: 28px;
  height: 28px;
  margin-bottom: 5px;
}

.social-sharing-button span {
  font-size: 0.8rem;
  font-weight: 500;
  color: #495057;
}

/* Link sharing section */
.link-sharing-section {
  margin-top: 15px;
}

.link-input-group {
  display: flex;
  margin-top: 10px;
}

.link-input {
  flex-grow: 1;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px 0 0 4px;
  font-size: 0.9rem;
}

.copy-link-button {
  background: #4285F4;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease;
}

.copy-link-button:hover {
  background: #3367d6;
}

.copy-link-button.copied {
  background: #28a745;
}

/* Story metrics display component */
.story-metrics {
  display: flex;
  align-items: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.metric {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

.metric .icon {
  width: 20px;
  height: 20px;
  margin-right: 5px;
  color: #6c757d;
}

.metric .count {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.like-button, .dislike-button, .favorite-button {
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6c757d;
}

.like-button:hover, .dislike-button:hover, .favorite-button:hover {
  color: #495057;
  transform: scale(1.1);
}

.like-button.active {
  color: #4285F4;
}

.dislike-button.active {
  color: #ea4335;
}

.heart-icon.heart-filled {
  fill: #ea4335;
  stroke: #ea4335;
}

.like-metric {
  display: flex;
  align-items: center;
}

/* Privacy toggle */
.privacy-toggle-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.privacy-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.privacy-toggle-label {
  margin: 0;
  font-weight: 500;
}

.privacy-toggle-hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #6c757d;
}

.privacy-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.privacy-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.privacy-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 22px;
}

.privacy-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.privacy-toggle input:checked + .privacy-toggle-slider {
  background-color: #4285F4;
}

.privacy-toggle input:focus + .privacy-toggle-slider {
  box-shadow: 0 0 1px #4285F4;
}

.privacy-toggle input:checked + .privacy-toggle-slider:before {
  transform: translateX(18px);
}

/* Login Modal */
.login-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000; /* Make sure this is higher than other elements */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none; /* By default, don't capture clicks */
}

.login-modal.show {
  opacity: 1;
  pointer-events: auto; /* Allow clicks when shown */
}

.login-modal-content {
  width: 90%;
  max-width: 400px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  padding: 20px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.login-modal.show .login-modal-content {
  transform: translateY(0);
  opacity: 1;
}

.login-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.login-modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.login-modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  line-height: 1;
}

.login-modal-close:hover {
  color: #333;
}

.login-modal-body {
  padding: 10px 0;
}

.login-message {
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.1rem;
  color: #555;
}

.login-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.google-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #555;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.google-login-button:hover {
  background-color: #f8f8f8;
  border-color: #ccc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.google-login-button svg {
  margin-right: 10px;
}

/* Apple button styling */
.apple-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background-color: #000;
  border: 1px solid #000;
  border-radius: 4px;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  cursor: pointer;
}

.apple-login-button:hover {
  background-color: #333;
  border-color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.apple-login-button svg {
  margin-right: 10px;
  fill: #fff;
}

.login-divider {
  margin: 0 10px;
  color: #ccc;
  display: flex;
  align-items: center;
}

/* Make sure login modal is visible when display flex is applied */
.login-modal[style*="display: flex"] {
  display: flex !important;
  pointer-events: auto; /* Enable interaction when displayed */
}

/* When modal is hidden, ensure it doesn't interfere with page interaction */
.login-modal:not(.show) {
  pointer-events: none;
  visibility: hidden;
}

@media (max-width: 576px) {
  .login-modal-content {
    width: 95%;
    max-width: 350px;
    padding: 15px;
  }
  
  .login-modal-title {
    font-size: 1.3rem;
  }
  
  .login-message {
    font-size: 1rem;
  }
}

/* Convert login prompt to work with login modal */
.login-prompt {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #300090;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  max-width: 320px;
  animation: slideIn 0.3s ease-out;
  display: none;
}

.login-prompt.show {
  display: block;
}

/* Make login-prompt work as a modal when converted */
.login-modal .login-prompt-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
}

.login-modal .login-prompt-text {
  margin: 15px 0;
  font-size: 1rem;
  color: white;
}

.login-modal .login-prompt-button {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.login-modal .login-button {
  background: white;
  color: #300090;
  border: none;
  text-decoration: none;
  display: inline-block;
}

.login-modal .dismiss-button {
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .social-sharing-options {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .story-metrics {
    flex-wrap: wrap;
  }
} 