/* Visual Comments Frontend Styles */

// Variables
$primary-color: #3858e9;
$danger-color: #d63638;
$warning-color: #dba617;
$success-color: #3858e9;
$text-color: #1d2327;
$border-color: #c3c4c7;
$background-color: #fff;
$overlay-bg: rgba(0, 0, 0, 0.8);

// Base styles
.sn-visual-comments {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  
  * {
    box-sizing: border-box;
  }
}

// Heroicon styles
.sn-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex-shrink: 0;
}

// Admin Bar Toggle Status
#wp-admin-bar-agwp-sn-toggle,
#wp-admin-bar-sn-toggle {
  #sn-admin-bar-toggle {
    // Default state: Green when comments are OFF (showing "Turn Comments ON")
    color: $success-color;
    font-weight: 600;
    
    // When comments are active (showing "Turn Comments OFF"), use normal color
    &.sn-comments-active {
      color: inherit;
      font-weight: normal;
    }
  }
}

// Admin Bar Menu Styling
#wp-admin-bar-agwp-sn-menu {
  .ab-submenu {
    li {
      min-width: 180px;
    }
  }
}

// Toggle Button
.sn-toggle-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  align-items: center;
  border-radius: 30px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  
  &:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
  }
  
  .sn-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: $text-color;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    
    &:hover {
      background: rgba(0, 0, 0, 0.05);
    }
    
    .sn-toggle-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      transition: transform 0.3s ease;
      
      svg {
        width: 20px;
        height: 20px;
      }
    }
    
    &:hover .sn-toggle-icon {
      transform: scale(1.1);
    }
  }
  
  .sn-toggle-text {
    display: flex;
    align-items: center;
    white-space: nowrap;
  }
  
  .sn-toggle-hide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 48px;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    color: #646970;
    font-size: 20px;
    transition: all 0.2s ease;
    
    &:hover {
      background: rgba(0, 0, 0, 0.08);
      color: $text-color;
    }

		svg {
			width: 20px;
			height: 20px;
		}
  }
  
  .sn-comments-count {
    margin-left: 6px;
    padding: 2px 8px;
    background: rgba(56, 88, 233, 0.1);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #3858e9;
  }
  
  // Inactive state (Comments OFF) - Clean white/gray
  &:not(.active) {
    background: rgba(255, 255, 255, 0.95);
    
    .sn-toggle-btn {
      color: #1d2327;
    }
    
    .sn-toggle-icon {
      color: #646970;
    }
  }
  
  // Active state (Comments ON) - Vibrant primary color
  &.active {
    background: linear-gradient(135deg, #3858e9 0%, #4f6bff 100%);
    
    .sn-toggle-btn {
      color: white;
    }
    
    .sn-toggle-icon {
      color: white;
    }
    
    .sn-toggle-hide {
      color: rgba(255, 255, 255, 0.8);
      border-left-color: rgba(255, 255, 255, 0.2);
      
      &:hover {
        background: rgba(255, 255, 255, 0.15);
        color: white;
      }
    }
    
    .sn-comments-count {
      background: rgba(255, 255, 255, 0.25);
      color: white;
    }
  }
}

// Overlay
.sn-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: $overlay-bg;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  cursor: pointer;
  
  .sn-overlay-message {
    background: $background-color;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
    animation: slideUp 0.4s ease;
    position: relative;
    cursor: default;
    
    .sn-overlay-close {
      position: absolute;
      top: 10px;
      right: 15px;
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;
      color: #646970;
      
      &:hover {
        color: $danger-color;
      }
    }
    
    h3 {
      margin: 0 0 10px 0;
      color: $primary-color;
      font-size: 18px;
    }
    
    p {
      margin: 0 0 20px 0;
      color: #646970;
    }
    
    .sn-overlay-hint {
      margin-top: 15px;
      padding-top: 15px;
      border-top: 1px solid #f0f0f1;
      
      small {
        color: #a0a5aa;
        font-style: italic;
      }
    }
  }
  
  .sn-overlay-instructions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
  }
  
  .sn-instruction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    
    .sn-instruction-icon {
      font-size: 18px;
      width: 24px;
      text-align: center;
    }
    
    span:last-child {
      font-size: 14px;
      color: $text-color;
    }
  }
}

// Comment Popup
.sn-comment-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sn-comment-popup {
  background: $background-color;
  border-radius: 8px;
  width: 350px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: popupSlideIn 0.2s ease;
  
  .sn-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid $border-color;
    cursor: move; // Indicate drag handle
    user-select: none; // Prevent text selection while dragging
    position: relative;
    
    &:hover {
      background-color: rgba(0, 0, 0, 0.02);
    }
    
    &::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 10px;
      transform: translateY(-50%);
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background-color: #ccc;
      box-shadow: 
        0 -8px 0 #ccc,
        0 8px 0 #ccc,
        8px -8px 0 #ccc,
        8px 0 0 #ccc,
        8px 8px 0 #ccc;
      opacity: 0.5;
    }
    
    h4 {
      margin: 0;
      font-size: 16px;
      color: $text-color;
      margin-left: 20px; // Space for drag handle
    }
    
    .sn-popup-close {
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;
      color: #646970;
      padding: 4px;
      
      &:hover {
        color: $danger-color;
      }
    }
  }
  
  .sn-popup-body {
    padding: 20px;
    
    .sn-element-info {
      margin-bottom: 12px;
      
      small {
        color: #646970;
        font-size: 12px;
      }
      
      code {
        background: #f0f0f1;
        padding: 2px 6px;
        border-radius: 3px;
        font-size: 11px;
      }
    }
    
    .sn-comment-textarea {
      width: 100%;
      border: 1px solid $border-color;
      border-radius: 4px;
      padding: 12px;
      font-size: 14px;
      resize: vertical;
      
      &:focus {
        outline: none;
        border-color: $primary-color;
        box-shadow: 0 0 0 1px $primary-color;
      }
    }
  }
  
  .sn-popup-footer {
    padding: 16px 20px;
    border-top: 1px solid $border-color;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
  }
}

// Comments Display Container
.sn-comments-display {
  position: relative;
  pointer-events: none; // Allow clicks to pass through to page elements
  
  // Ensure markers are clickable
  .sn-comment-marker {
    pointer-events: auto;
  }
}

// Comment Markers
.sn-comment-marker {
  position: absolute;
  cursor: pointer;
  z-index: 10000;
  pointer-events: auto;
  
  .sn-marker-dot {
    min-width: 40px;
    height: 30px;
    border-radius: 15px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 8px;
    border: 2px solid #2271b1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    
    &:hover {
      transform: scale(1.1);
    }

    .sn-marker-icon {
      font-size: 14px;
      line-height: 1;
    }

    .sn-marker-number {
      color: #2271b1;
      font-weight: bold;
      font-size: 12px;
    }
  }
  
  .sn-marker-pulse {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 50px;
    height: 40px;
    border-radius: 20px;
    background: rgba(34, 113, 177, 0.2);
    animation: pulse 2s infinite;
  }
  
  &.selected .sn-marker-dot {
    transform: scale(1.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }
}

// Comment Detail Popup
.sn-comment-detail-popup {
  background: $background-color;
  border-radius: 8px;
  width: 380px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: popupSlideIn 0.2s ease;
  
  .sn-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid $border-color;
    cursor: move;
    background: #f9f9f9;
    
    .sn-popup-title {
      display: flex;
      align-items: center;
      gap: 10px;
      
      strong {
        color: $text-color;
        font-size: 14px;
      }
    }
    
    .sn-status-badge {
      padding: 4px 8px;
      border-radius: 12px;
      background: #f0f0f0;
      color: #2c3338;
      font-size: 11px;
      font-weight: bold;
      text-transform: uppercase;
      display: flex;
      align-items: center;
      gap: 4px;

      .sn-status-icon {
        font-size: 12px;
        line-height: 1;
      }
    }
    
    .sn-popup-close {
      background: none;
      border: none;
      font-size: 18px;
      cursor: pointer;
      color: #646970;
      padding: 4px;
      
      &:hover {
        color: $danger-color;
      }
    }
  }
  
  .sn-popup-content {
    padding: 16px;
  }
  
  .sn-comment-screenshot {
    margin-bottom: 16px;
    
    img {
      width: 100%;
      height: auto;
      border-radius: 4px;
      cursor: pointer;
      border: 1px solid $border-color;
      
      &:hover {
        opacity: 0.9;
      }
    }
  }
  
  .sn-comment-content {
    margin-bottom: 16px;
    
    .sn-comment-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
      
      strong {
        color: $text-color;
        font-size: 13px;
      }
      
      .sn-comment-date {
        font-size: 11px;
        color: #646970;
      }
    }
    
    .sn-comment-text {
      color: $text-color;
      line-height: 1.5;
      margin: 0;
    }
    
    .sn-element-info {
      margin-top: 8px;
      
      small {
        color: #646970;
        font-size: 11px;
      }
      
      code {
        background: #f0f0f1;
        padding: 2px 6px;
        border-radius: 3px;
        font-size: 10px;
      }
      
      .sn-goto-element {
        background: $primary-color;
        color: white;
        border: none;
        padding: 4px 8px;
        border-radius: 3px;
        font-size: 10px;
        margin-left: 8px;
        cursor: pointer;
        
        &:hover {
          opacity: 0.9;
        }
      }
    }
  }
  
  .sn-status-controls {
    margin-bottom: 16px;
    
    label {
      font-size: 12px;
      color: $text-color;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .sn-status-select {
      padding: 6px 8px;
      border: 1px solid $border-color;
      border-radius: 4px;
      font-size: 12px;
    }
  }
  
  .sn-replies {
    margin-bottom: 16px;
    
    h5 {
      margin: 0 0 12px 0;
      font-size: 13px;
      color: $text-color;
    }
    
    .sn-reply {
      background: #f9f9f9;
      padding: 12px;
      border-radius: 4px;
      margin-bottom: 8px;
      
      .sn-reply-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 6px;
        
        strong {
          font-size: 12px;
          color: $text-color;
        }
        
        .sn-reply-date {
          font-size: 10px;
          color: #646970;
        }
      }
      
      p {
        margin: 0;
        font-size: 13px;
        color: $text-color;
        line-height: 1.4;
      }
    }
  }
  
  .sn-reply-form {
    margin-bottom: 12px;
    
    textarea {
      width: 100%;
      border: 1px solid $border-color;
      border-radius: 4px;
      padding: 10px;
      font-size: 13px;
      margin-bottom: 10px;
      
      &:focus {
        outline: none;
        border-color: $primary-color;
      }
    }
    
    .sn-reply-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
    }
  }
  
  .sn-comment-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
  }
}

// Buttons
.sn-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  
  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  &.sn-btn-primary {
    background: $primary-color;
    color: white;
    
    &:hover:not(:disabled) {
      background: darken($primary-color, 10%);
    }
  }
  
  &.sn-btn-secondary {
    background: $border-color;
    color: $text-color;
    
    &:hover:not(:disabled) {
      background: darken($border-color, 10%);
    }
  }
}

// Spinner
.sn-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

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

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

// Responsive
@media (max-width: 768px) {
  .sn-comment-popup,
  .sn-comment-detail-popup {
    width: 90vw;
    max-width: 350px;
  }
  
  .sn-toggle-button {
    bottom: 15px;
    right: 15px;
  }
  
  .sn-overlay .sn-overlay-message {
    margin: 20px;
    padding: 20px;
  }
}

// No comments message
.sn-no-comments {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  pointer-events: none;
  
  p {
    margin: 0;
    color: #646970;
    font-style: italic;
  }
}

/* Comment Sidebar Styles */
.sn-sidebar-close.sn-button {
  position: fixed;
  top: 20px;
  right: 400px; // 380px sidebar width + 20px margin
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 50%;
  z-index: 100000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;

  .sn-button__icon {
    margin: 0;
  }

  .sn-icon {
    width: 18px;
    height: 18px;
  }

  // Account for WordPress admin bar when present
  body.admin-bar & {
    top: 52px; // 32px admin bar + 20px margin
    
    @media screen and (max-width: 782px) {
      top: 66px; // 46px admin bar + 20px margin
    }
  }
  
  &:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  
  &:active {
    transform: scale(0.95);
  }
  
  // When sidebar is hidden
  &.sn-sidebar-hidden {
    right: 20px;
  }
  
  // When sidebar is hidden, position button at right edge
  &.sn-sidebar-hidden {
    right: 20px;
  }
}

.sn-comment-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100vh;
  background: $background-color;
  border-left: 1px solid $border-color;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

  // Account for WordPress admin bar when present
  body.admin-bar & {
    top: 32px;
    height: calc(100vh - 32px);
    
    @media screen and (max-width: 782px) {
      top: 46px;
      height: calc(100vh - 46px);
    }
  }
  
  .sn-sidebar-header {
    background: #f9f9f9;
    padding: 20px;
    border-bottom: 1px solid $border-color;
    flex-shrink: 0;
    
    h3 {
      margin: 0 0 5px 0;
      font-size: 16px;
      font-weight: 600;
      color: $text-color;
    }
    
    .sn-comments-count {
      font-size: 14px;
      color: #646970;
      margin: 0;
    }
  }
  
  .sn-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
  }
  
  .sn-no-comments-sidebar {
    padding: 40px 20px;
    text-align: center;
    color: #646970;
    
    p {
      margin: 0 0 15px 0;
      
      &.sn-instruction {
        font-size: 14px;
        font-style: italic;
        opacity: 0.8;
      }
    }
  }
  
  .sn-comments-list {
    padding: 0;
  }
}

/* Status Groups */
.sn-status-group {
  margin-bottom: 20px;
  
  .sn-status-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px 10px 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
    
    &:hover {
      background: #f0f0f0;
    }
    
    .sn-status-icon {
      font-size: 16px;
      line-height: 1;
      margin-right: 8px;
    }
    
    h4 {
      margin: 0;
      font-size: 14px;
      font-weight: 600;
      color: $text-color;
      flex: 1;
    }
    
    .sn-toggle-arrow {
      background: none;
      border: none;
      color: #646970;
      cursor: pointer;
      padding: 4px;
      border-radius: 2px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: color 0.2s ease, background-color 0.2s ease;

      .sn-icon {
        width: 14px;
        height: 14px;
      }
      
      &:hover {
        color: $text-color;
        background: rgba(0, 0, 0, 0.05);
      }
    }
  }
}

/* Comment Tasks */
.sn-comment-task {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease;
  
  &:hover {
    background: #fafafa;
  }
  
  &.selected {
    background: #e7f3ff;
    border-left: 3px solid $primary-color;
  }
  
  .sn-task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    
    .sn-task-info {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      
      .sn-task-id {
        background: $primary-color;
        color: white;
        padding: 2px 6px;
        border-radius: 10px;
        font-size: 11px;
        font-weight: bold;
      }
      
      .sn-task-author {
        font-weight: 500;
        font-size: 13px;
        color: $text-color;
      }
      
      .sn-task-date {
        font-size: 11px;
        color: #646970;
      }
    }
    
    .sn-locate-btn {
      background: none;
      border: none;
      cursor: pointer;
      font-size: 16px;
      padding: 4px;
      border-radius: 4px;
      transition: background-color 0.2s ease;
      
      &:hover {
        background: #e0e0e0;
      }
    }
  }
  
  .sn-task-content {
    margin-bottom: 12px;
    
    .sn-task-text {
      margin: 0 0 8px 0;
      font-size: 14px;
      line-height: 1.4;
      color: $text-color;
    }
    
    .sn-task-selector {
      margin-bottom: 8px;
      
      code {
        background: #f1f1f1;
        padding: 2px 6px;
        border-radius: 3px;
        font-size: 11px;
        color: #666;
      }
    }
    
    .sn-task-screenshot {
			margin-top: 8px;
      margin-bottom: 8px;
      
      img {
        width: 100%;
        max-width: 200px;
        height: auto;
        border-radius: 4px;
        border: 1px solid #ddd;
        cursor: pointer;
        transition: opacity 0.2s ease;
        
        &:hover {
          opacity: 0.8;
        }
      }
    }
  }
  
  .sn-task-status {
    margin-bottom: 10px;
    
    .sn-status-select {
      width: 100%;
      padding: 6px 8px;
      border: 1px solid $border-color;
      border-radius: 4px;
      font-size: 13px;
      background: $background-color;
    }
  }
  
  .sn-task-replies {
    margin-bottom: 12px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    border-left: 3px solid #ddd;
    
    .sn-replies-header {
      margin-bottom: 8px;
      
      strong {
        font-size: 12px;
        color: $text-color;
      }
    }
    
    .sn-task-reply {
      margin-bottom: 8px;
      
      &:last-child {
        margin-bottom: 0;
      }
      
      .sn-reply-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
        
        strong {
          font-size: 12px;
          color: $text-color;
        }
        
        .sn-reply-date {
          font-size: 10px;
          color: #646970;
        }
      }
      
      .sn-reply-text {
        margin: 0;
        font-size: 13px;
        line-height: 1.4;
        color: #555;
      }
    }
  }
  
  .sn-task-actions {
    .sn-reply-btn {
      background: $primary-color;
      color: white;
      border: none;
      padding: 6px 12px;
      border-radius: 4px;
      font-size: 12px;
      cursor: pointer;
      transition: background-color 0.2s ease;
      
      &:hover {
        background: darken($primary-color, 10%);
      }
    }
    
    .sn-reply-form {
      .sn-reply-textarea {
        width: 100%;
        padding: 8px;
        border: 1px solid $border-color;
        border-radius: 4px;
        font-size: 13px;
        line-height: 1.4;
        resize: vertical;
        min-height: 60px;
        margin-bottom: 8px;
      }
      
      .sn-reply-actions {
        display: flex;
        gap: 8px;
        
        .sn-reply-submit {
          background: $primary-color;
          color: white;
          border: none;
          padding: 6px 12px;
          border-radius: 4px;
          font-size: 12px;
          cursor: pointer;
          
          &:hover:not(:disabled) {
            background: darken($primary-color, 10%);
          }
          
          &:disabled {
            opacity: 0.6;
            cursor: not-allowed;
          }
        }
        
        .sn-reply-cancel {
          background: transparent;
          color: #666;
          border: 1px solid #ccc;
          padding: 6px 12px;
          border-radius: 4px;
          font-size: 12px;
          cursor: pointer;
          
          &:hover {
            background: #f0f0f0;
          }
        }
      }
    }
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .sn-comment-sidebar {
    width: 320px;
  }
  
  .sn-sidebar-close.sn-button {
    right: 340px; // 320px sidebar width + 20px margin
  }
}

@media (max-width: 768px) {
  .sn-comment-sidebar {
    width: 100%;
    height: 50vh;
    top: auto;
    bottom: 0;
    border-left: none;
    border-top: 1px solid $border-color;
    
    .sn-sidebar-content {
      max-height: calc(50vh - 70px);
    }
  }
  
  .sn-sidebar-close.sn-button {
    top: auto;
    bottom: 52vh; // Just above the sidebar (50vh + 2vh margin)
    right: 20px;
  }
}

/* Priority Badges */
.sn-priority-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  
  &.sn-priority-low {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
  }
  
  &.sn-priority-medium {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
  }
  
  &.sn-priority-high {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
  }
}

/* Priority Selector in Comment Popup */
.sn-priority-selector {
  margin-top: 10px;
  
  label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
  }
  
  select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    background-color: white;
    
    &:focus {
      outline: none;
      border-color: $primary-color;
      box-shadow: 0 0 0 1px $primary-color;
    }
  }
}

// Title elements styles
.sn-task-title,
.sn-comment-title {
  font-weight: 600;
  font-size: 14px;
  color: #1d2327;
  margin-bottom: 6px;
  line-height: 1.4;
}

.sn-comment-title {
  font-size: 13px;
  margin-bottom: 4px;
}

// Comment input styles for title field
.sn-comment-title {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid $border-color;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 8px;
  
  &:focus {
    outline: none;
    border-color: $primary-color;
    box-shadow: 0 0 0 1px $primary-color;
  }
}

// UI Components
@import '../components/ui/Button.scss';