/* ============================================
   MyReactions - Modern UX Version
   ============================================ */

/* Container */
.myreactions-container {
  padding: 10px;
  border-top: 1px solid #ccc;
}
.myreactions-container.myreactions-profile-container {
	padding: 0;
	border: 0;
}

/* Reaction Buttons in Postbit */
.myreactions-reactions, .myreactions-reaction {
  background: #f5f5f5;
  border: 1px solid #ccc;
  display: inline-block;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.myreactions-reaction {
  display: inline-block;
  margin: 2px;
  padding: 5px;
  float: left;
}
.myreactions-reaction:hover {
  background: #e8e8e8;
  transform: scale(1.05);
}
.myreactions-reactions {
	float: left;
	margin-right: 5px;
}
.myreactions-reaction span {
  float: right;
  margin-left: 5px;
}
.myreactions-reactions img {
  margin: 5px;
  float: left;
  display: inline-block;
}

/* ============================================
   Add Reaction Button - Modern Design
   ============================================ */
.myreactions-add-button {
  display: none;
  margin: 2px;
  padding: 6px 12px;
  float: left;
  cursor: pointer;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 20px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.myreactions-add-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.myreactions-add-icon {
  display: inline-block;
  margin-right: 4px;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
}

.myreactions-add-text {
  display: inline-block;
  line-height: 1;
}

/* Show button on hover or when no reactions exist */
.myreactions-container:hover .myreactions-add-button,
.myreactions-add-button.reaction-add-force {
  display: inline-block;
}

/* Reacted Section */
.myreactions-container .myreactions-reacted img {
  position: relative;
}
.myreactions-container .myreactions-reacted img + span {
	cursor: pointer;
	display: inline-block;
    margin-right: 5px;
}

/* ============================================
   Modal Overlay & Container
   ============================================ */
.myreactions-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.myreactions-modal-container {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Header */
.myreactions-modal-header {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border-radius: 12px 12px 0 0;
}

.myreactions-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: white !important;
}

.myreactions-modal-close {
  font-size: 32px !important;
  font-weight: 300;
  color: white !important;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.2s ease;
  padding: 0 5px;
  background: transparent !important;
  border: none !important;
  opacity: 1 !important;
}

.myreactions-modal-close:hover {
  transform: scale(1.2);
  background: transparent !important;
}

/* Modal Sections */
.myreactions-section {
  padding: 20px;
}

.myreactions-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.myreactions-favourites {
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

/* Reaction Grid */
.myreactions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
}

.myreactions-grid img {
	width: 32px;
	height: 32px;
	padding: 8px;
	margin: 0;
	border-radius: 8px;
	transition: all 0.2s ease;
	cursor: pointer;
	background: white;
	border: 2px solid transparent;
}

.myreactions-grid img:hover:not(.disabled) {
	background: #f0f0f0;
	transform: scale(1.15);
	border-color: #667eea;
}

.myreactions-grid img.disabled {
	cursor: not-allowed;
	opacity: 0.3;
	filter: grayscale(100%);
}

/* ============================================
   Reaction Size Variants
   ============================================ */
.myreactions-container.reactions-16 img {
  width: 16px;
  height: 16px;
}
.myreactions-container.reactions-16 .myreactions-reaction span,
.myreactions-container.reactions-16 .myreactions-reacted {
  font-size: 12px;
  line-height: 16px;
}
.myreactions-container.reactions-16 .myreactions-reacted img {
  top: 4px;
}

.myreactions-container.reactions-20 img {
  width: 20px;
  height: 20px;
}
.myreactions-container.reactions-20 .myreactions-reaction span,
.myreactions-container.reactions-20 .myreactions-reacted {
  font-size: 13px;
  line-height: 20px;
}
.myreactions-container.reactions-20 .myreactions-reacted img {
  top: 6px;
}

.myreactions-container.reactions-24 img {
  width: 24px;
  height: 24px;
}
.myreactions-container.reactions-24 .myreactions-reaction span,
.myreactions-container.reactions-24 .myreactions-reacted {
  font-size: 14px;
  line-height: 24px;
}
.myreactions-container.reactions-24 .myreactions-reacted img {
  top: 7px;
}

.myreactions-container.reactions-28 img {
  width: 28px;
  height: 28px;
}
.myreactions-container.reactions-28 .myreactions-reaction span,
.myreactions-container.reactions-28 .myreactions-reacted {
  font-size: 15px;
  line-height: 28px;
}
.myreactions-container.reactions-28 .myreactions-reacted img {
  top: 7px;
}

.myreactions-container.reactions-32 img {
  width: 32px;
  height: 32px;
}
.myreactions-container.reactions-32 .myreactions-reaction span,
.myreactions-container.reactions-32 .myreactions-reacted {
  font-size: 16px;
  line-height: 32px;
}
.myreactions-container.reactions-32 .myreactions-reacted img {
  top: 8px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  .myreactions-modal-container {
    width: 95%;
    max-width: 95%;
    border-radius: 8px;
  }

  .myreactions-modal-header {
    padding: 15px;
    border-radius: 8px 8px 0 0;
  }

  .myreactions-modal-header h3 {
    font-size: 16px;
  }

  .myreactions-section {
    padding: 15px;
  }

  .myreactions-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 6px;
  }

  .myreactions-grid img {
    width: 28px;
    height: 28px;
    padding: 6px;
  }

  .myreactions-add-button {
    padding: 5px 10px;
    font-size: 12px;
  }
}

/* Scrollbar Styling */
.myreactions-modal-container::-webkit-scrollbar {
  width: 8px;
}

.myreactions-modal-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0 0 12px 0;
}

.myreactions-modal-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.myreactions-modal-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}
