/*
 * 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.
 */


@import url("https://cloudsecurityalliance.org/assets/application.css");

html {
  background-color: #f5f5f5;
}

.c-megamenu--audit-bot {
  box-shadow: 0 4px 2px -2px rgba(0, 0, 0, 0.2);
  padding: 0.25em 0;
}

pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.75rem;
  padding: 1rem;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.u-pin-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.c-button--disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Submissions page */
.c-submissions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.c-submissions-header__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px;
}

.c-submissions-header__count {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #9ca3af;
}

.c-submissions-header__cap {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.c-submissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

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

.c-submission-wrapper {
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
  animation-delay: calc(var(--delay) * 0.08s);
}

.c-submissions-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem;
  text-align: center;
}

.c-submissions-empty__icon {
  font-size: 3rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.c-submissions-empty__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 0.5rem;
}

.c-submissions-empty__text {
  color: #9ca3af;
  margin: 0 0 1.5rem;
}

/* New submission page */
.c-new-submission {
  max-width: 640px;
  margin: 0 auto;
}

.c-new-submission__heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 1rem;
}

.c-new-submission__hint {
  font-size: 0.8rem;
  color: #9ca3af;
  margin: 0.5rem 0 0;
  text-align: center;
}

.c-new-submission__hint i {
  margin-right: 0.25rem;
}

/* File Upload Styling - BEM Methodology */
.c-file-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin: 1.5rem 0;
  border: 2px dashed #ccc;
  border-radius: 0.5rem;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  text-align: center;
  min-height: 200px;
}

.c-file-drop--dragover {
  background-color: rgba(0, 123, 255, 0.05);
  border-color: #007bff;
}

.c-file-drop--has-file {
  background-color: rgba(40, 167, 69, 0.05);
  border-color: #28a745;
}

.c-file-drop__message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.c-file-drop__message p {
  margin: 0.5rem 0;
  color: #495057;
}

.c-file-drop__subtext {
  font-size: 0.875rem;
  color: #6c757d;
}

.c-file-drop__input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.c-file-drop__browse-button {
  display: inline-block;
  margin-top: 0.5rem;
  cursor: pointer;
}

.c-file-drop__filename {
  margin-top: 1rem;
  font-weight: bold;
  color: #28a745;
  word-break: break-all;
}

.c-file-drop__icon {
  font-size: 2rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.c-submission {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.c-submission:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.c-submission__header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.c-submission__title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.c-submission__status {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
}

.c-submission__status--queued {
  background-color: rgba(217, 119, 6, 0.12);
  color: #d97706;
}

.c-submission__status--processing {
  background-color: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.c-submission__status--processed {
  background-color: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.c-submission__status--error {
  background-color: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.c-submission__status-icon {
  margin-left: 6px;
}

.c-submission__header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.c-submission__queue-position {
  font-size: 0.7rem;
  font-weight: 500;
  color: #9ca3af;
}

.c-submission__body {
  padding: 20px;
}

.c-submission__info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.c-submission__info-item {
  margin: 0;
}

.c-submission__info-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 3px;
}

.c-submission__info-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
}

.c-submission__score {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 4px;
}

.c-submission__score-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  line-height: 1;
}

.c-submission__score-label {
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  padding: 3px 10px;
}

.c-submission__score-label--passed {
  background-color: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.c-submission__score-label--failed {
  background-color: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.c-submission__progress-container {
  margin-bottom: 12px;
}

.c-submission__progress-track {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background-color: #e5e7eb;
  overflow: hidden;
  margin-bottom: 6px;
}

.c-submission__progress-fill {
  height: 100%;
  background-color: #3b82f6;
  border-radius: 3px;
  transition: width 0.4s ease;
}

@keyframes indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(500%); }
}

.c-submission__progress-fill--indeterminate {
  width: 20%;
  animation: indeterminate 1.4s ease-in-out infinite;
}

.c-submission__progress-text {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
}

.c-submission__error {
  margin-top: 12px;
  padding: 10px 14px;
  background-color: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #ef4444;
  border-radius: 4px;
  font-size: 0.875rem;
  color: #dc2626;
}

.c-submission__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  background-color: #f9fafb;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.c-submission__file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background-color: #f3f4f6;
  color: #374151;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.c-submission__file-link:hover {
  background-color: #e5e7eb;
}

.c-submission__file-link--primary {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.c-submission__file-link--primary:hover {
  background-color: rgba(59, 130, 246, 0.18);
}

.c-submission__file-icon {
  font-size: 14px;
}

@media (min-width: 768px) {
  .o-grid__column--4\@md {
    width: 33.333333%;
  }
}

.u-h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
}

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

.c-dashboard-table th {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
}

.c-dashboard-table td {
  padding: 10px;
  border-bottom: 1px solid #f3f4f6;
}

.text-success {
  color: #38a169;
}

.text-danger {
  color: #e53e3e;
}

.c-metric-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 24px;
  margin-bottom: 20px;
  height: calc(100% - 20px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.c-metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.c-metric-card__value {
  font-size: 36px;
  font-weight: 700;
  color: #3182ce;
  margin-bottom: 8px;
}

.c-metric-card__label {
  font-size: 16px;
  color: #4a5568;
  margin-bottom: 4px;
}

.c-metric-card__label--sub {
  font-size: 14px;
  color: #718096;
  margin-bottom: 8px;
}

.c-metric-card__date {
  font-size: 12px;
  color: #a0aec0;
}

.c-chart-container {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  height: 300px;
  margin-top: 10px;
}

.status-processed {
  color: #38a169;
  font-weight: 500;
}

.status-processing {
  color: #3182ce;
  font-weight: 500;
}

.status-queued {
  color: #d97706;
  font-weight: 500;
}

.status-error {
  color: #e53e3e;
  font-weight: 500;
}

/* ── Modal modifiers ── */

.o-modal__content--wide {
  width: 80vw !important;
  max-width: 80vw !important;
}

/* ── Log modal terminal output ── */

.c-log-output {
  background-color: #0d1117;
  color: #c9d1d9;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 16px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  max-height: 60vh;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.c-log-output__timestamp {
  color: #8b949e;
}

.c-log-output__sep {
  color: #6e7681;
}

.c-log-output__logger {
  color: #9ca3af;
}

.c-log-output__message {
  color: #d1d5db;
}

.c-log-output__other {
  color: #6b7280;
}

.c-log-output__level--info {
  color: #4ade80;
  font-weight: 600;
}

.c-log-output__level--debug {
  color: #818cf8;
  font-weight: 600;
}

.c-log-output__level--warning {
  color: #fbbf24;
  font-weight: 600;
}

.c-log-output__level--error {
  color: #f87171;
  font-weight: 600;
}

/* Model selector */
.c-model-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.c-model-selector__label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.c-model-selector__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.c-model-card {
  position: relative;
  cursor: pointer;
  display: block;
  height: 100%;
}

.c-model-card__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.c-model-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
  height: 100%;
  box-sizing: border-box;
}

.c-model-card:hover .c-model-card__body {
  border-color: #93c5fd;
}

.c-model-card__input:checked + .c-model-card__body {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.c-model-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.c-model-card__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.25;
}

.c-model-card__badge {
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 2px 7px;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.c-model-card__badge--default {
  background-color: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.c-model-card__badge--reference {
  background-color: rgba(107, 114, 128, 0.12);
  color: #6b7280;
}

.c-model-card__badge--powerful {
  background-color: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}

.c-model-card__desc {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
  margin: 0;
}

.c-model-card__deprecation {
  font-size: 0.7rem;
  color: #d97706;
  margin: 0;
}

.c-model-card__deprecation i {
  margin-right: 3px;
}

