/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.cases-container {
  width: 80%;
  margin: 0 auto;
}

.cases-container h1 {
  margin: 0;
}

.cases-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.cases-table {
  width: 100%;
  border-collapse: collapse;
}

.cases-table th,
.cases-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.cases-table th {
  background-color: #f5f5f5;
  font-weight: bold;
}

.cases-table tbody tr {
  cursor: pointer;
  transition: background-color 0.2s;
}

.cases-table tbody tr:hover {
  background-color: #f0f0f0;
}

.case-show-container {
  width: 80%;
  margin: 0 auto;
}

.case-show-container h1 {
  margin-bottom: 30px;
}

.case-block {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.case-block h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.2em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #007bff;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Form styles */
.child-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-actions {
  margin-top: 30px;
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #545b62;
}

.form-errors {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.form-errors h3 {
  margin-top: 0;
}

/* Edit link style */
.edit-link {
  font-size: 14px;
  color: #007bff;
  text-decoration: none;
  margin-left: 10px;
}

.edit-link:hover {
  text-decoration: underline;
}

.child-header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.child-header h1 {
  margin: 0;
}

/* Status dropdown */
.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.status-form {
  display: inline;
}

.status-select {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}

.status-select:focus {
  outline: none;
  border-color: #007bff;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.status-active {
  background-color: #d4edda;
  color: #155724;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-expired {
  background-color: #f8d7da;
  color: #721c24;
}

.status-closed {
  background-color: #e2e3e5;
  color: #383d41;
}

.status-no-case {
  background-color: #fce4ec;
  color: #880e4f;
}

/* Activities styles */
.activities-container {
  width: 80%;
  margin: 0 auto;
}

.activities-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.activities-header h1 {
  margin: 0;
}

.category-section {
  margin-bottom: 30px;
}

.category-title {
  background-color: #f5f5f5;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.activities-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.activities-table th,
.activities-table td {
  padding: 10px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.activities-table th {
  background-color: #fafafa;
  font-weight: bold;
}

.activities-table tbody tr.clickable-row {
  cursor: pointer;
  transition: background-color 0.2s;
}

.activities-table tbody tr.clickable-row:hover {
  background-color: #f0f0f0;
}

.description-cell {
  max-width: 400px;
  color: #666;
}

.actions-cell {
  white-space: nowrap;
}

.action-link {
  color: #007bff;
  text-decoration: none;
  margin-right: 10px;
}

.action-link:hover {
  text-decoration: underline;
}

.delete-link {
  color: #dc3545;
}

.no-activities {
  text-align: center;
  color: #666;
  padding: 40px;
}

/* Time Log styles */
.time-log-form-container {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.time-log-form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.time-log-form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.time-log-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.log-time-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.log-time-link:hover {
  text-decoration: underline;
}

.time-logs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.time-logs-table th,
.time-logs-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.time-logs-table.compact th,
.time-logs-table.compact td {
  padding: 6px 8px;
  font-size: 13px;
}

.contact-recent {
  margin-bottom: 10px;
}

.consent-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.preview-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #d6e4ff;
  background: #eef4ff;
  color: #1f6feb;
}

.phase-intro {
  margin: 8px 0 12px 0;
  color: #555;
  font-size: 13px;
}

.inline-flag-form {
  margin: 8px 0 12px 0;
}

.select-inline {
  display: inline-block;
  width: auto;
  min-width: 200px;
  margin: 0 8px;
}

.time-logs-table.compact th,
.time-logs-table.compact td {
  padding: 6px 8px;
  font-size: 13px;
}

.contact-recent {
  margin-bottom: 10px;
}

.consent-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.preview-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #d6e4ff;
  background: #eef4ff;
  color: #1f6feb;
}

.phase-intro {
  margin: 8px 0 12px 0;
  color: #555;
  font-size: 13px;
}

.time-logs-table th {
  background-color: #fafafa;
  font-weight: bold;
  font-size: 13px;
}

.time-logs-table td {
  font-size: 14px;
}

.time-logs-table .comment-cell {
  color: #666;
  max-width: 200px;
}

.time-logs-table .timestamp-cell {
  color: #888;
  font-size: 12px;
  white-space: nowrap;
}

.no-time-logs {
  color: #666;
  font-style: italic;
  margin-top: 10px;
}

.time-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.time-log-header h2 {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.total-hours {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  background-color: #e9ecef;
  padding: 5px 12px;
  border-radius: 4px;
}

/* Child form extended styles */
.child-form-wide {
  max-width: 800px;
}

.form-section {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  background-color: #fafafa;
}

.form-section legend {
  font-weight: bold;
  font-size: 1.1em;
  padding: 0 10px;
  color: #333;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

.form-row .form-group-small {
  flex: 0.5;
}

.radio-group {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: normal;
  cursor: pointer;
}

.languages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  cursor: pointer;
}

/* Info grid for Case show */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 15px;
}

.info-section {
  background-color: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
}

.info-section h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 8px;
}

.info-section p {
  margin: 5px 0;
  font-size: 14px;
}

/* Children without Cases section */
.children-without-cases {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #ddd;
}

.children-without-cases h2 {
  margin-bottom: 20px;
  font-size: 1.3em;
  color: #666;
}

/* Header buttons */
.header-buttons {
  display: flex;
  gap: 10px;
}

/* Eligibility badges */
.eligibility-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
}

.eligibility-badge.eligible {
  background-color: #d4edda;
  color: #155724;
}

.eligibility-badge.not-eligible {
  background-color: #f8d7da;
  color: #721c24;
}

/* Form hints */
.form-hint {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

/* Info box */
.info-box {
  background-color: #e7f3ff;
  border: 1px solid #b6d4fe;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 20px 0;
}

.info-box h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #0c5460;
}

.info-box ul {
  margin: 0;
  padding-left: 20px;
}

.info-box li {
  font-size: 13px;
  color: #0c5460;
  margin-bottom: 5px;
}

/* No children message */
.no-children-message {
  color: #666;
  font-style: italic;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

/* Deadline styles */
.deadline-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
}

.deadline-on-track {
  background-color: #d4edda;
  color: #155724;
}

.deadline-warning {
  background-color: #fff3cd;
  color: #856404;
}

.deadline-urgent {
  background-color: #f8d7da;
  color: #721c24;
}

.deadline-overdue {
  background-color: #721c24;
  color: white;
}

/* Case timeline section */
.case-timeline {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.case-timeline h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #495057;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-label {
  font-size: 13px;
  color: #666;
}

.timeline-value {
  font-size: 13px;
  font-weight: bold;
}

/* ACS Warning */
.acs-warning {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.acs-warning h3 {
  margin: 0 0 5px 0;
  font-size: 14px;
  color: #856404;
}

.acs-warning p {
  margin: 0;
  font-size: 13px;
  color: #856404;
}

/* Section header with edit link */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 10px 0;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 8px;
}

.phase2-header {
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.section-header h3 {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}

/* Assignment status row */
.assignment-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  flex-wrap: wrap;
}

/* Small button */
.btn-small {
  padding: 4px 10px;
  font-size: 12px;
}

/* Acceptance status styles */
.acceptance-status {
  padding: 10px 15px;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 13px;
}

.acceptance-status.accepted {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.acceptance-status.pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

/* Subtitle */
.subtitle {
  color: #666;
  margin-top: -10px;
  margin-bottom: 20px;
}

/* Documents section */
.documents-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

.documents-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-toggle-btn {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #d0d7de;
  background: #f6f8fa;
  color: #24292f;
  cursor: pointer;
  transition: all 0.12s ease-in-out;
}

.section-toggle-btn:hover {
  background: #eaeef2;
  border-color: #c2cbd3;
}

.documents-header h2 {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.deadline-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.deadline-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef2ff;
  color: #1f6feb;
  border: 1px solid #d6e4ff;
}

.deadline-pill.pill-warn {
  background: #fff3cd;
  border-color: #ffe08a;
  color: #856404;
}

.deadline-pill.pill-ok {
  background: #d4edda;
  border-color: #bde5c8;
  color: #155724;
}

.deadline-pill.pill-info {
  background: #e7f3ff;
  border-color: #c7defc;
  color: #0c5460;
}

.phase2-header {
  align-items: flex-start;
}

.phase2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
}

.phase2-card {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.phase2-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.phase2-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.phase2-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.consent-group {
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
}

.consent-group legend {
  font-weight: 600;
  font-size: 13px;
  padding: 0 6px;
}

.checkbox-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}

.progress-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-text {
  font-size: 13px;
  font-weight: bold;
  color: #333;
}

.progress-bar {
  width: 150px;
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #28a745;
  transition: width 0.3s ease;
}

.document-category {
  margin-bottom: 25px;
}

.category-label {
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding: 8px 12px;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.documents-table {
  width: 100%;
  border-collapse: collapse;
}

.documents-table th,
.documents-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.documents-table th {
  font-size: 12px;
  font-weight: bold;
  color: #666;
  text-transform: uppercase;
}

.document-name {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
}

.document-description {
  display: block;
  font-size: 12px;
  color: #888;
}

.no-link {
  color: #999;
  font-style: italic;
  font-size: 13px;
}

/* Document status badges */
.status-not-ready {
  background-color: #f8d7da;
  color: #721c24;
}

/* Document info box */
.document-info-box {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.document-info-box p {
  margin: 5px 0;
  font-size: 14px;
}

/* Button styled as link */
.btn-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: #007bff;
  text-decoration: none;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-link.delete-link {
  color: #dc3545;
}

/* Small text actions */
.actions-cell-right {
  text-align: right;
  white-space: nowrap;
  min-width: 120px;
}

.action-inline-form {
  display: inline;
  margin: 0;
}

.action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s ease-in-out;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.action-pill--create {
  color: #0f5132;
  border-color: #c7eed8;
  background: #e8f6ee;
}

.action-pill--create:hover {
  background: #d8efe4;
  border-color: #b3e3c8;
}

.action-pill--edit {
  color: #1f6feb;
  border-color: #d6e4ff;
  background: #eef4ff;
}

.action-pill--edit:hover {
  background: #dfe9ff;
  border-color: #c3d6ff;
}

.action-pill--delete {
  color: #b02a37;
  border-color: #f3c2c2;
  background: #fff5f5;
}

.action-pill--delete:hover {
  background: #ffe8e8;
  border-color: #ef9f9f;
}

.action-sm {
  font-size: 11px;
  color: #6c757d;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  margin: 0;
  display: inline;
}

.action-sm:hover {
  color: #007bff;
}

.action-sm.action-delete:hover {
  color: #dc3545;
}

.action-sm::after {
  content: " |";
  color: #ddd;
  margin-left: 4px;
}

.action-sm:last-child::after,
.action-sm:last-of-type::after {
  content: "";
  margin-left: 0;
}

/* Phase 4 - Authorization Tracking */
.auth-tracking-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.auth-tracking-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #dee2e6;
}

.auth-tracking-item strong {
  min-width: 280px;
}

.auth-tracking-item small {
  color: #6c757d;
  margin-left: 8px;
}

.phase-intro {
  padding: 12px 16px;
  background: #e9ecef;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: #495057;
}
