/**
 * Care Connect Prior Authorization Portal
 * Custom Styles
 * 
 * Upload as Web File: /prior-auth-styles.css
 * Partial URL: prior-auth-styles.css
 * 
 * Color Palette aligned with VA Design System / U.S. Web Design System
 */

/* ==========================================================================
   LAYOUT & CONTAINERS
   ========================================================================== */

.prior-auth-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.form-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid #0071bc;
}

.form-header h1 {
  color: #112e51;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.form-subtitle {
  color: #205493;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.form-description {
  color: #4c4c4c;
  font-size: 14px;
}

.required-notice {
  color: #4c4c4c;
  font-size: 13px;
  margin-top: 8px;
}

.required-indicator {
  color: #e31c3d;
  font-weight: bold;
}

/* ==========================================================================
   PROGRESS INDICATOR
   ========================================================================== */

.prior-auth-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0 32px;
  padding: 16px;
  background: #f1f1f1;
  border-radius: 8px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #aeb0b5;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}

.progress-step.active .step-number {
  background: #0071bc;
  box-shadow: 0 0 0 3px rgba(0, 113, 188, 0.3);
}

.progress-step.completed .step-number {
  background: #2e8540;
}

.step-label {
  font-size: 12px;
  color: #4c4c4c;
  font-weight: 600;
  text-align: center;
  max-width: 100px;
}

.progress-step.active .step-label {
  color: #0071bc;
}

.progress-connector {
  width: 80px;
  height: 3px;
  background: #aeb0b5;
  margin: 0 12px;
  margin-bottom: 20px;
}

.progress-connector.completed {
  background: #2e8540;
}

/* ==========================================================================
   STATUS BADGES
   ========================================================================== */

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge-large {
  font-size: 16px;
  padding: 8px 20px;
}

.status-submitted {
  background-color: #e1f3f8;
  color: #0071bc;
  border: 1px solid #0071bc;
}

.status-under-review {
  background-color: #fff1d2;
  color: #946800;
  border: 1px solid #fdb81e;
}

.status-approved {
  background-color: #e7f4e4;
  color: #2e8540;
  border: 1px solid #2e8540;
}

.status-denied {
  background-color: #f9dede;
  color: #cd2026;
  border: 1px solid #e31c3d;
}

.status-returned {
  background-color: #fff0e6;
  color: #c05600;
  border: 1px solid #e37222;
}

.status-pending-info {
  background-color: #fff1d2;
  color: #946800;
  border: 1px solid #fdb81e;
}

/* ==========================================================================
   STATUS LEGEND
   ========================================================================== */

.status-legend {
  margin-bottom: 24px;
  padding: 12px 16px;
  background: #f9f9f9;
  border-radius: 4px;
  border: 1px solid #d6d7d9;
}

.status-legend .status-badge {
  margin-right: 8px;
  margin-bottom: 4px;
}

/* ==========================================================================
   STATUS BANNER (Detail View)
   ========================================================================== */

.status-banner {
  padding: 16px 24px;
  border-radius: 6px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-banner-submitted { background: #e1f3f8; border-left: 4px solid #0071bc; }
.status-banner-under-review { background: #fff1d2; border-left: 4px solid #fdb81e; }
.status-banner-approved { background: #e7f4e4; border-left: 4px solid #2e8540; }
.status-banner-denied { background: #f9dede; border-left: 4px solid #e31c3d; }
.status-banner-returned-for-information { background: #fff0e6; border-left: 4px solid #e37222; }

.status-updated {
  font-size: 13px;
  color: #4c4c4c;
}

/* ==========================================================================
   FORM FIELDS
   ========================================================================== */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  color: #212121;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.form-control {
  border: 1px solid #5b616b;
  border-radius: 3px;
  padding: 10px 12px;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: #0071bc;
  box-shadow: 0 0 0 2px rgba(0, 113, 188, 0.25);
  outline: none;
}

.form-group.has-error .form-control {
  border-color: #e31c3d;
  box-shadow: 0 0 0 2px rgba(227, 28, 61, 0.2);
}

.form-group.has-success .form-control {
  border-color: #2e8540;
}

.validation-error {
  color: #e31c3d;
  font-size: 13px;
  margin-top: 4px;
  display: block;
}

.char-counter {
  font-size: 12px;
  color: #5b616b;
  text-align: right;
}

.char-counter.text-danger {
  color: #e31c3d;
  font-weight: 600;
}

/* ==========================================================================
   FILE UPLOAD
   ========================================================================== */

.upload-section {
  margin: 24px 0;
}

.upload-instructions {
  background: #e1f3f8;
  border: 1px solid #0071bc;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.upload-instructions h3 {
  color: #0071bc;
  font-size: 16px;
  margin-bottom: 8px;
}

.upload-instructions ul {
  margin: 0;
  padding-left: 20px;
}

.upload-instructions li {
  margin-bottom: 4px;
  font-size: 14px;
  color: #212121;
}

.upload-error {
  margin-bottom: 16px;
}

input[type="file"] {
  padding: 12px;
  border: 2px dashed #aeb0b5;
  border-radius: 6px;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.2s;
}

input[type="file"]:hover {
  border-color: #0071bc;
  background: #f1f9ff;
}

/* ==========================================================================
   INFO PANEL (Medication Details)
   ========================================================================== */

.info-panel {
  background: #f1f1f1;
  border: 1px solid #d6d7d9;
  border-radius: 6px;
  padding: 16px 20px;
  margin-top: 16px;
}

.info-panel.hidden {
  display: none;
}

.info-panel h3 {
  font-size: 15px;
  color: #112e51;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d6d7d9;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 4px 12px;
  margin: 0;
}

.info-panel dt {
  font-weight: 600;
  color: #4c4c4c;
  font-size: 13px;
}

.info-panel dd {
  margin: 0;
  font-size: 14px;
  color: #212121;
}

/* ==========================================================================
   CONFIRMATION PAGE
   ========================================================================== */

.confirmation-container {
  text-align: center;
  padding: 48px 24px;
}

.confirmation-icon {
  margin-bottom: 24px;
}

.confirmation-container h1 {
  color: #2e8540;
  margin-bottom: 24px;
}

.confirmation-details {
  background: #e7f4e4;
  border: 2px solid #2e8540;
  border-radius: 8px;
  padding: 20px;
  margin: 24px auto;
  max-width: 400px;
}

.case-number-label {
  font-size: 14px;
  color: #4c4c4c;
  margin-bottom: 4px;
}

.case-number-value {
  font-size: 28px;
  font-weight: 700;
  color: #112e51;
}

.confirmation-info {
  text-align: left;
  max-width: 600px;
  margin: 32px auto;
}

.confirmation-info h2 {
  font-size: 20px;
  color: #112e51;
  margin-bottom: 16px;
}

.confirmation-info ol {
  padding-left: 20px;
}

.confirmation-info li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.urgency-note {
  background: #f1f1f1;
  border-radius: 4px;
  padding: 12px 16px;
  margin-top: 16px;
}

.confirmation-actions {
  margin-top: 32px;
}

.confirmation-actions .btn {
  margin: 0 8px;
}

/* ==========================================================================
   DOCUMENTS TABLE
   ========================================================================== */

.documents-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #d6d7d9;
}

.documents-section h2 {
  font-size: 20px;
  color: #112e51;
  margin-bottom: 16px;
}

/* ==========================================================================
   PAGE HEADER (My Requests)
   ========================================================================== */

.page-header {
  border-bottom: 2px solid #0071bc;
  padding-bottom: 16px;
  margin-bottom: 24px;
  overflow: hidden;
}

.page-header h1 {
  float: left;
  color: #112e51;
  font-size: 28px;
}

.page-description {
  clear: left;
  color: #4c4c4c;
  margin-top: 8px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn-primary {
  background-color: #0071bc;
  border-color: #0071bc;
  color: white;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 4px;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: #205493;
  border-color: #205493;
}

.btn-default {
  background-color: white;
  border-color: #5b616b;
  color: #212121;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 4px;
}

.btn-default:hover, .btn-default:focus {
  background-color: #f1f1f1;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  .prior-auth-progress {
    flex-wrap: wrap;
  }

  .progress-connector {
    width: 40px;
  }

  .status-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .page-header h1 {
    float: none;
  }

  .page-header .btn {
    display: block;
    margin-top: 12px;
    float: none;
  }

  .confirmation-actions .btn {
    display: block;
    margin: 8px 0;
    width: 100%;
  }
}

/* ==========================================================================
   ACCESSIBILITY - Focus states and high contrast
   ========================================================================== */

*:focus-visible {
  outline: 3px solid #0071bc;
  outline-offset: 2px;
}

@media (forced-colors: active) {
  .status-badge {
    border: 2px solid currentColor;
  }

  .step-number {
    border: 2px solid currentColor;
  }
}

/* Skip navigation for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
