/* Ringtone Modern Share Component Styles */
.r2m-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  background-color: var(--accent-primary, #0d79ba);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-family: inherit;
  text-decoration: none;
}

.r2m-share-btn:hover {
  background-color: var(--accent-primary-hover, #095b8d);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 121, 186, 0.3);
}

.r2m-share-btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Modal Backdrop */
.r2m-share-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Modal Card */
.r2m-share-card {
  background-color: #171717;
  border: 1px solid #262626;
  color: #f5f5f5;
  width: 100%;
  max-width: 380px;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.r2m-share-modal.r2m-active .r2m-share-card {
  transform: scale(1);
}

/* Modal Header */
.r2m-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid #262626;
}

.r2m-share-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.r2m-share-close {
  background: transparent;
  border: none;
  color: #a3a3a3;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.r2m-share-close:hover {
  color: #ffffff;
  background-color: #262626;
}

/* Preview Badge */
.r2m-preview-badge {
  margin: 1rem 0;
  padding: 0.75rem;
  background-color: rgba(38, 38, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.r2m-preview-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background-color: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.r2m-preview-details {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r2m-preview-name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r2m-preview-meta {
  margin: 0.125rem 0 0 0;
  font-size: 0.75rem;
  color: #a3a3a3;
}

/* Share Channels Grid */
.r2m-share-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.5rem 0;
  text-align: center;
  font-size: 0.75rem;
}

.r2m-share-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem;
  border-radius: 0.75rem;
  color: #d4d4d4;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.r2m-share-channel:hover {
  background-color: #262626;
  color: #ffffff;
}

.r2m-channel-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.r2m-share-channel:hover .r2m-channel-icon {
  transform: scale(1.08);
}

.r2m-icon-whatsapp {
  background-color: rgba(37, 211, 102, 0.12);
  color: #25D366;
}

.r2m-icon-telegram {
  background-color: rgba(34, 158, 217, 0.12);
  color: #229ED9;
}

.r2m-icon-x {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.r2m-icon-native {
  background-color: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

.r2m-channel-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.r2m-icon-native svg {
  fill: none;
  stroke: currentColor;
}

/* Quick Copy Link Bar */
.r2m-copy-bar {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #262626;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.r2m-url-input {
  width: 100%;
  background-color: #0a0a0a;
  border: 1px solid #262626;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: #d4d4d4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.r2m-url-input:focus {
  border-color: var(--accent-primary, #0d79ba);
}

.r2m-copy-btn {
  padding: 0.5rem 0.75rem;
  background-color: #262626;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease, transform 0.1s ease;
  min-width: 60px;
}

.r2m-copy-btn:hover {
  background-color: #404040;
}

.r2m-copy-btn.r2m-copied {
  background-color: #059669 !important;
  color: #ffffff !important;
}
