

:root {
  --accent: #7F7F7F;
  --accent_light: #BDBDBD;
  --border: #262626;
  --bg: #FFFFFF;
  --radius: 5px;
  --border_w: 3px;
  --danger:#F44336;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color:#f4f4f4;
  margin:0;
  font-family:Arial, sans-serif;
  color:var(--text);
}

body, input, select, textarea, button, pre {
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-color: #262626;
}

button:disabled {
  opacity: 0.5;  
  cursor: not-allowed; 
}

button.running:disabled {
  opacity: 1;
  cursor: default;
}

.container {
  max-width:1000px;
  width:min(1000px, calc(100% - 24px));
  margin:20px auto;
  background:#F1F1F1;
  padding:20px;
  border:var(--border_w) solid var(--border);
  border-radius:var(--radius);
  text-align:center;
  box-shadow:0 4px 12px rgba(0,0,0,0.3);
}

h1, h2, h3 {
  text-align: center;
  color: #333;
}

label {
  display: block;
  margin-top: 10px;
  color:#262626;
}

input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 3px solid #262626;
  border-radius: 5px;
  box-sizing: border-box;
}

#download-section .download-form-grid {
  width: min(100%, 900px);
  margin: 14px auto 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 14px;
  align-items: end;
}

#download-section .download-field {
  min-width: 0;
}

#download-section .download-field label {
  display: block;
  margin: 0 0 6px;
  text-align: left;
  font-weight: 600;
}

#download-section .download-field input,
#download-section .download-field select {
  width: 100%;
  margin: 0;
}

@media (max-width: 520px) {
  .container {
    width: calc(100% - 12px);
    margin: 6px auto;
    padding: 12px;
  }

  #download-section .download-form-grid {
    grid-template-columns: 1fr;
  }
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: #262626;
  background-color: #C2C2C2;  
  outline: none;   
}

textarea {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 3px solid #262626;
  border-radius: 5px;
  box-sizing: border-box;
  resize: vertical;
}

.buttons {
  text-align: center;
  margin: 10px 0;
}

button {
  padding: 10px 20px;
  margin: 10px 5px;
  border-radius: 5px;
  border: 3px solid #262626;
  background-color: #ffffff;
  color: #262626;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s ease;
}

button:hover {
  border: 3px solid #262626;
  background-color: #262626;
  color: #ffffff;
}

#download-btn.running {
  background-color: #7F7F7F;
  font-weight: bold;
  color: #262626;
}

#analyse-form button.running,
#start-sediment-btn.running {
  background-color: #7F7F7F;
  font-weight: bold;
  color: #262626;
}

.upload-area {
  border: 3px dashed #262626;  
  background-color: #ffffff;     
  padding: 20px;
  text-align: center;
  margin: 10px 0;
  cursor: pointer;
  border-radius: 8px; 
}
.upload-area.dragover {
  background-color: #BDBDBD;
  border: 3px solid #7F7F7F;   
}

.result-container {
  display: none;
  background-color: #7F7F7F;
  border: 3px solid #262626;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left;
}

.result-container.status-success {
  text-align: center;
}

.result-container.status-success strong {
  font-weight: 700;
}

progress {
  width: 100%;
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  border: 3px solid #262626;
  border-radius: 0;
  overflow: hidden;
}

.section {
  margin-bottom: 40px;
}

.spinner {
  border: 8px solid #262626;
  border-top: 8px solid #7F7F7F;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

.progress-details {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-line;
}

.process-topbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}

.process-title {
  font-size:22px;
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
  text-align:center;
  color:#262626;
}

.process-id {
  font-size:14px;
  font-weight:600;
  color:#7F7F7F;
}

.process-icon-btn {
  width:48px;
  height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#FFFFFF;
  border:3px solid #262626;
  border-radius:8px;
  text-decoration:none;
  transition:background-color 0.2s ease, border-color 0.2s ease;
  position:relative;
  padding:0;
  margin:0;
  box-sizing:border-box;
  cursor:pointer;
  flex-shrink:0;
}

.process-icon-btn:hover {
  background:#7F7F7F;
  border-color:#262626;
}

.process-icon-btn:hover .process-icon {
  background-color:#262626;
}

.process-icon {
  width:24px;
  height:24px;
  display:inline-block;
  background-color:#262626;
  transition:background-color 0.2s ease;
  mask-repeat:no-repeat;
  -webkit-mask-repeat:no-repeat;
  mask-position:center;
  -webkit-mask-position:center;
  mask-size:contain;
  -webkit-mask-size:contain;
}

.process-icon-back {
  mask-image:url('/static/icons/arrow-left-to-line.svg');
  -webkit-mask-image:url('/static/icons/arrow-left-to-line.svg');
}

.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;
}

@media (max-width: 640px) {
  .process-topbar {
    flex-direction:column;
    align-items:center;
    justify-content:center;
  }

  .process-title {
    width:100%;
    text-align:center;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

progress::-webkit-progress-bar {
  background-color: #eee;
  border: none;
}

progress::-webkit-progress-value {
  background-color: #7F7F7F;
}

progress::-moz-progress-bar {
  background-color: #7F7F7F
}
