/* Operator Dashboard Custom Styles - Uses dashboard.css as base */

/* Additional styles for operator-specific features */
.hidden {
  display: none !important;
}


/* Tab Navigation Active State */
.tab-btn.active {
  background-color: #00008B;
  color: white;
}

.tab-btn.active:hover {
  background-color: #00006B;
}

/* Smooth Transitions */
.tab-content {
  animation: fadeIn 0.3s ease-in;
}

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

/* Custom Scrollbar for Sidebar */
aside::-webkit-scrollbar {
  width: 6px;
}

aside::-webkit-scrollbar-track {
  background: #f1f1f1;
}

aside::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

aside::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Card Hover Effects */
.bg-white.rounded-xl.shadow-sm:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* File Input Styling Enhancement */
input[type="file"]::file-selector-button {
  transition: all 0.2s ease;
}

/* Form Input Focus States */
input:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 139, 0.1);
}

/* Button Hover Transitions */
button {
  transition: all 0.2s ease;
}

/* Summary Card Icon Animation */
.summary-card-icon {
  transition: transform 0.2s ease;
}

.summary-card:hover .summary-card-icon {
  transform: scale(1.1);
}

/* Table Row Hover */
tbody tr {
  transition: background-color 0.15s ease;
}

/* Loading State (for future use) */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  aside {
    width: 200px;
  }
  
  main {
    margin-left: 200px;
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  aside {
    width: 180px;
  }
  
  main {
    margin-left: 180px;
    padding: 1rem;
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

/* Job Card Styles */
.job-card-section {
  margin-bottom: 1.5rem;
}

.jobs-list-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.job-card-container {
  display: flex;
  gap: 1.5rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.job-card-container:hover:not(.job-locked) {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-color: #d1d5db;
}

.job-card-container {
  position: relative;
}

/* Job Lock Badge */
.job-lock-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.job-lock-badge svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: #ef4444;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Locked Job Styling */
.job-card-container.job-locked {
  cursor: not-allowed;
}

.job-card-container.job-locked:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-color: #d1d5db;
}

/* Disabled Button */
.btn-disabled {
  background: #e5e7eb !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.btn-disabled:hover {
  background: #e5e7eb !important;
  transform: none !important;
  box-shadow: none !important;
}

.job-thumbnail {
  width: 200px;
  height: 150px;
  background: #e5e7eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.job-card-content {
  flex: 1;
}

.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.job-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 0.5rem;
}

.job-meta {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

.priority-badge {
  padding: 0.25rem 0.75rem;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Job Detail Styles */
.back-button-container {
  margin-bottom: 1rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.job-detail-section {
  margin-bottom: 1.5rem;
}

.job-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.job-detail-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

/* Video Player with Screenshot Functionality */
.video-player-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: #1f2937;
}

.video-player {
  width: 100%;
  height: auto;
  max-height: 500px;
  display: block;
  background: #000;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.video-overlay.screenshot-mode {
  pointer-events: auto;
  cursor: crosshair;
}

.click-indicator {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 4px solid #3b82f6;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 6;
  animation: clickPulse 0.6s ease-out;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
}

@keyframes clickPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.8;
    box-shadow: 0 0 0 20px rgba(59, 130, 246, 0);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.video-controls-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  gap: 0.75rem;
}

.screenshot-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #00008B 0%, #4169e1 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 139, 0.3);
  transition: all 0.2s ease;
}

.screenshot-mode-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 139, 0.4);
  background: linear-gradient(135deg, #00006B 0%, #1e40af 100%);
}

.screenshot-mode-btn:active {
  transform: translateY(0);
}

.screenshot-mode-btn.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  animation: pulse 2s infinite;
}

.screenshot-mode-btn.active:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6);
  }
}

.screenshot-mode-btn svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.skip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.625rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  color: #374151;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.skip-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background: white;
  border-color: rgba(0, 0, 0, 0.2);
}

.skip-btn:active {
  transform: translateY(0);
}

.skip-btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.video-player-wrapper:hover .video-controls-overlay {
  opacity: 1;
}

.video-controls-overlay {
  opacity: 0.95;
  transition: opacity 0.2s ease;
}

.job-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.detail-label {
  color: #6b7280;
}

.detail-value {
  color: #374151;
  font-weight: 500;
  margin-left: 0.5rem;
}

/* Lock Status Indicator */
.lock-status-indicator {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.lock-status-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.lock-status-content svg {
  color: #065f46;
  flex-shrink: 0;
}

.lock-status-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.lock-status-label {
  font-weight: 600;
  color: #065f46;
  font-size: 0.875rem;
}

.lock-timer {
  font-size: 0.75rem;
  color: #047857;
  font-weight: 500;
}

.job-actions-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.job-action-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid;
  cursor: pointer;
}

.job-action-button svg {
  flex-shrink: 0;
}

.lock-button {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-color: #fcd34d;
}

.lock-button:hover {
  background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.release-button {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border-color: #fca5a5;
}

.release-button:hover {
  background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Guide Creation Form Styles */
.form-heading {
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 1.5rem;
}

.form-input-disabled {
  background: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

.textarea-resize-vertical {
  resize: vertical;
}

.helper-text {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.steps-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.steps-header > div {
  flex: 1;
}

.add-step-button {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.add-step-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.25rem;
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-container {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  background: #ffffff;
  transition: all 0.2s ease;
}

.step-container:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.step-number {
  width: 32px;
  height: 32px;
  background: #00008B;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.step-input {
  flex: 1;
}

.step-delete-btn {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 6px;
  padding: 0.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.step-delete-btn:hover {
  background: #fecaca;
  border-color: #fca5a5;
  color: #991b1b;
}

/* File Upload Styles */
.step-file-upload {
  margin-top: 0.75rem;
}

.file-upload-label {
  display: block;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-upload-label input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.file-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  transition: all 0.2s ease;
  text-align: center;
}

.file-upload-content svg {
  color: #6b7280;
  transition: color 0.2s ease;
}

.file-upload-content span:first-of-type {
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
}

.file-upload-hint {
  font-size: 0.75rem;
  color: #6b7280;
}

.file-upload-label:hover .file-upload-content {
  border-color: #00008B;
  background: #f0f9ff;
}

.file-upload-label:hover .file-upload-content svg {
  color: #00008B;
}

.file-upload-label.drag-over .file-upload-content {
  border-color: #00008B;
  background: #eff6ff;
  border-style: solid;
  transform: scale(1.02);
}

.file-upload-label.drag-over .file-upload-content svg {
  color: #00008B;
  transform: scale(1.1);
}

.step-image-preview {
  position: relative;
  margin-top: 0.75rem;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
}

.preview-image {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
}

.preview-remove-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #dc2626;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
}

.preview-remove-btn:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
  transform: scale(1.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.form-actions-right {
  justify-content: flex-end;
}

/* Completed Tab Enhancements */
.completed-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-container {
  position: relative;
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  background: white;
}

.search-input:focus {
  outline: none;
  border-color: #00008B;
  box-shadow: 0 0 0 3px rgba(0, 0, 8, 0.1);
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
}

.sort-select {
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
}

.sort-select:focus {
  outline: none;
  border-color: #00008B;
  box-shadow: 0 0 0 3px rgba(0, 0, 8, 0.1);
}

.completed-results-info {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.completed-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.completed-empty-state svg {
  margin-bottom: 1rem;
  opacity: 0.5;
}

.completed-empty-state p {
  margin: 0.5rem 0;
  color: #6b7280;
  font-size: 0.875rem;
}

.completed-empty-state p:first-of-type {
  font-weight: 500;
  color: #374151;
  font-size: 1rem;
}

.empty-state-hint {
  font-size: 0.75rem !important;
  color: #9ca3af !important;
}

/* Pagination Styles */
.pagination-container {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #374151;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 40px;
  justify-content: center;
}

.pagination-btn:hover:not(.disabled):not(.active) {
  background: #f9fafb;
  border-color: #9ca3af;
}

.pagination-btn.active {
  background: #00008B;
  color: white;
  border-color: #00008B;
  font-weight: 500;
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f9fafb;
}

.pagination-btn svg {
  flex-shrink: 0;
}

.pagination-ellipsis {
  padding: 0 0.5rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Responsive adjustments for completed tab */
@media (max-width: 768px) {
  .completed-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container {
    max-width: 100%;
  }

  .sort-container {
    width: 100%;
  }

  .sort-select {
    flex: 1;
  }

  .pagination {
    gap: 0.25rem;
  }

  .pagination-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}

/* Pending Jobs Preview Styles */
.jobs-preview-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.job-preview-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.job-preview-item:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateX(4px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.job-preview-thumbnail {
  width: 48px;
  height: 48px;
  background: #f3f4f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.job-preview-info {
  flex: 1;
  min-width: 0;
}

.job-preview-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.job-preview-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.job-preview-meta {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-separator {
  color: #d1d5db;
}

.job-preview-arrow {
  color: #9ca3af;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.job-preview-item:hover .job-preview-arrow {
  transform: translateX(4px);
  color: #00008B;
}

.no-jobs-message {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
  font-size: 0.875rem;
}

/* Responsive adjustments for job cards */
@media (max-width: 768px) {
  .job-card-container {
    flex-direction: column;
  }
  
  .job-thumbnail {
    width: 100%;
    height: 200px;
  }
  
  .job-details-grid {
    grid-template-columns: 1fr;
  }
  
  .job-actions-container {
    flex-direction: column;
  }
  
  .job-action-button {
    flex: none;
  }
}

/* Locked status badge */
.job-status.locked {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 9999px;
}
