/* ==========================================================================
   FlexOps Ship Manager - Portal-Specific Theme
   Common Radzen overrides are now in the shared library:
   _content/FlexOps.Blazor.Shared/css/flexops-radzen-overrides.css
   This file only contains Ship Manager-specific rules.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Base Styles
   -------------------------------------------------------------------------- */
body {
  background-color: var(--flexops-bg-secondary) !important;
  color: var(--flexops-text-primary);
  font-family: var(--flexops-font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

::selection {
  background-color: var(--flexops-brand-100);
  color: var(--flexops-brand-900);
}

html {
  scroll-behavior: smooth;
}


/* --------------------------------------------------------------------------
   2. SM-Specific Card Classes
   -------------------------------------------------------------------------- */

.vs-card,
.api-card {
  background: var(--flexops-bg-primary);
  border-radius: var(--flexops-radius-xl);
  box-shadow: var(--flexops-shadow-sm);
  border: 1px solid var(--flexops-border-secondary);
  padding: var(--flexops-space-6);
  margin-bottom: var(--flexops-space-4);
  transition: box-shadow var(--flexops-transition), transform var(--flexops-transition);
}

.vs-card:hover,
.api-card:hover {
  box-shadow: var(--flexops-shadow-md);
}

.vs-card-interactive {
  cursor: pointer;
}

.vs-card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--flexops-shadow-lg);
}

/* API card left border accent */
.api-card {
  border-left: 4px solid transparent;
  border-left-width: 4px;
}

.api-card.anonymous-api {
  border-left-color: var(--flexops-success-600);
}

.api-card.authorized-api {
  border-left-color: var(--flexops-brand-600);
}


/* --------------------------------------------------------------------------
   3. SM-Specific Button Classes
   -------------------------------------------------------------------------- */

.vs-btn {
  border-radius: var(--flexops-radius-lg);
  font-weight: 500;
  font-size: 0.875rem;
  padding: var(--flexops-space-2) var(--flexops-space-4);
  transition: all var(--flexops-transition-fast);
  text-transform: none;
  letter-spacing: 0;
}

.vs-btn:focus {
  box-shadow: var(--flexops-shadow-focus);
  outline: none;
}

.vs-btn-primary {
  background-color: var(--flexops-brand-600);
  color: white;
  border: none;
}

.vs-btn-primary:hover {
  background-color: var(--flexops-brand-700);
}

.vs-btn-success {
  background-color: var(--flexops-success-600);
  color: white;
  border: none;
}

.vs-btn-light,
.vs-btn-secondary {
  background-color: var(--flexops-gray-100);
  color: var(--flexops-gray-700);
  border: 1px solid var(--flexops-border-secondary);
}

.vs-btn-light:hover,
.vs-btn-secondary:hover {
  background-color: var(--flexops-gray-200);
}

.vs-btn-ghost {
  background: transparent;
  color: var(--flexops-gray-600);
  border: none;
}

.vs-btn-ghost:hover {
  background-color: var(--flexops-gray-100);
  color: var(--flexops-gray-800);
}


/* Striped rows are now in the shared library:
   flexops-radzen-overrides.css §18 */


/* --------------------------------------------------------------------------
   4. Status Indicators & Badges
   -------------------------------------------------------------------------- */
.vs-badge {
  border-radius: var(--flexops-radius-full);
  padding: var(--flexops-space-1) var(--flexops-space-3);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.vs-badge-success {
  background-color: var(--flexops-success-50);
  color: var(--flexops-success-600);
  border: 1px solid var(--flexops-success-200);
}

.vs-badge-danger {
  background-color: var(--flexops-error-50);
  color: var(--flexops-error-600);
  border: 1px solid var(--flexops-error-200);
}

.vs-badge-warning {
  background-color: var(--flexops-warning-50);
  color: var(--flexops-warning-600);
  border: 1px solid var(--flexops-warning-200);
}

.vs-badge-info {
  background-color: var(--flexops-blue-50);
  color: var(--flexops-blue-600);
  border: 1px solid var(--flexops-blue-100);
}

/* Status text colors */
.test-status {
  font-weight: 600;
  margin-left: var(--flexops-space-2);
}

.test-status.success,
.success-text {
  color: var(--flexops-success-600);
}

.test-status.error,
.error-text {
  color: var(--flexops-error-600);
}

.test-status.running,
.warning-text {
  color: var(--flexops-warning-600);
}

.info-text {
  color: var(--flexops-blue-600);
}


/* Alert/message styling (.rz-message) is now in the shared library:
   flexops-radzen-overrides.css §16 */

/* SM-specific .vs-alert keeps SM border-radius via shared tokens */
.vs-alert {
  border-radius: var(--flexops-radius-xl) !important;
  padding: var(--flexops-space-4) !important;
  border-left-width: 4px !important;
}


/* Progress bar styling (.rz-progressbar) is now in the shared library:
   flexops-radzen-overrides.css §17 */

.vs-skeleton {
  background: linear-gradient(90deg, var(--flexops-gray-100) 25%, var(--flexops-gray-200) 50%, var(--flexops-gray-100) 75%);
  background-size: 200% 100%;
  animation: vs-shimmer 1.5s infinite;
  border-radius: var(--flexops-radius-lg);
}

@keyframes vs-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* --------------------------------------------------------------------------
   8. Utility Classes
   -------------------------------------------------------------------------- */

.batch-controls {
  background-color: var(--flexops-bg-primary);
  padding: var(--flexops-space-4);
  border-radius: var(--flexops-radius-xl);
  margin-bottom: var(--flexops-space-4);
  border: 1px solid var(--flexops-border-secondary);
  box-shadow: var(--flexops-shadow-xs);
}

.vs-divider {
  height: 1px;
  background-color: var(--flexops-border-secondary);
  margin: var(--flexops-space-6) 0;
}

.vs-focus-ring:focus {
  outline: none;
  box-shadow: var(--flexops-shadow-focus);
}

.vs-text-muted {
  color: var(--flexops-text-quaternary);
}

.vs-text-primary {
  color: var(--flexops-brand-600);
}

.batch-row-invalid > td {
  background-color: var(--flexops-warning-50) !important;
  border-top: 1px solid var(--flexops-warning-200) !important;
  border-bottom: 1px solid var(--flexops-warning-200) !important;
}

.batch-row-invalid > td:first-child {
  border-left: 3px solid var(--flexops-warning-600) !important;
}

.batch-missing-fields {
  color: var(--flexops-warning-700);
  font-weight: 600;
  white-space: normal;
}

.batch-field-missing .rz-inputtext,
.batch-field-missing input {
  background-color: var(--flexops-warning-50) !important;
  border-color: var(--flexops-warning-400) !important;
}

.pack-scan-panel {
  border-left: 4px solid var(--flexops-brand-600);
}

.pack-scan-input {
  font-size: 1.05rem;
  font-weight: 600;
}

.pack-scan-input input {
  min-height: 44px;
}


/* --------------------------------------------------------------------------
   9. Responsive Adjustments
   — !important on .rz-* selectors to override Radzen responsive defaults
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .radzen-body .rz-px-4 {
    padding-left: var(--flexops-space-4) !important;
    padding-right: var(--flexops-space-4) !important;
  }

  .vs-card,
  .api-card,
  .rz-card {
    padding: var(--flexops-space-4) !important;
  }

  .rz-dialog {
    margin: var(--flexops-space-4) !important;
    max-width: calc(100vw - var(--flexops-space-8)) !important;
  }
}


/* --------------------------------------------------------------------------
   10. Print Styles
   — !important is standard practice in print media queries
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: white !important;
  }

  .rz-sidebar,
  .rz-header,
  .vs-btn,
  .rz-button {
    display: none !important;
  }

  .vs-card,
  .rz-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}
