html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #f8f9fa;
}

/* Loading indicator styling */
#loadingIndicator {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 5px;
  background-color: rgba(0, 123, 255, 0.1);
  color: #0056b3;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Custom CSS for K8s Assessment App */
.card {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.card-header {
  border-radius: 8px 8px 0 0 !important;
  font-weight: 500;
}

.accordion-button:not(.collapsed) {
  background-color: #e7f1ff;
  color: #0d6efd;
}

.accordion-item {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.table th {
  background-color: #343a40;
  color: white;
  font-weight: 600;
  padding: 0.75rem;
  vertical-align: middle;
}

.badge {
  font-size: 0.85em;
  padding: 0.35em 0.65em;
}

/* Score badge styles */
.score-badge {
  font-size: 1.2rem;
  padding: 0.5rem 0.75rem;
  border-radius: 50px;
}

/* File upload area */
.custom-file-upload {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
  background-color: #f8f9fa;
}

.custom-file-upload:hover {
  border-color: #0d6efd;
  background-color: #e7f1ff;
}

/* Tooltip styles */
.custom-tooltip {
  position: relative;
}

.custom-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  background-color: #343a40;
  color: white;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 1;
}

/* Animated spinner */
.spinner-border-lg {
  width: 3rem;
  height: 3rem;
}

/* Recommendation link styling */
.btn-sm.btn-primary {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.btn-sm.btn-primary i {
  margin-right: 4px;
}

/* Table improvements */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  table-layout: auto;
}

/* Column width adjustments */
.table th:nth-child(1), /* Category */
.table td:nth-child(1) {
  width: 10%;
  min-width: 100px;
}

.table th:nth-child(2), /* Description */
.table td:nth-child(2) {
  width: 30%;
  min-width: 200px;
}

.table th:nth-child(3), /* Severity/Status */
.table td:nth-child(3) {
  width: 10%;
  min-width: 100px;
  text-align: center;
}

.table th:nth-child(4), /* Recommendation */
.table td:nth-child(4) {
  width: 40%;
  min-width: 250px;
}

.table th:nth-child(5), /* Link */
.table td:nth-child(5) {
  width: 10%;
  min-width: 120px;
  text-align: center;
}

/* Word wrap for table cells */
.table td {
  word-wrap: break-word;
  max-width: 400px;
}

/* Improve readability for longer text content */
.table td p {
  margin-bottom: 0;
}

.description-cell, .recommendation-cell {
  white-space: pre-line;
  line-height: 1.4;
  max-width: 400px;
}

/* Add a slight highlight to table rows on hover */
.table-hover tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

/* Adjustments for cross-manifest table */
.cross-manifest-table th:nth-child(1), /* Manifest */
.cross-manifest-table td:nth-child(1) {
  width: 10%;
  min-width: 100px;
}

.cross-manifest-table th:nth-child(5), /* Related Manifests */
.cross-manifest-table td:nth-child(5) {
  width: 15%;
  min-width: 120px;
}

/* Make sure container has enough width on larger screens */
@media (min-width: 992px) {
  .container {
    max-width: 95%;
  }
}
