/* 
 * FOSVisualizer Main CSS
 * Based on the production app style guide
 */

/* Typekit font is imported in the HTML files */

/* Root variables */
:root {
  /* Primary colors */
  --primary: #a7c638;
  --primary-dark: #717318;
  --primary-light: #d7ec9d;
  
  /* Secondary colors */
  --secondary: #5b585d;
  --gray-900: #1b191c;
  --gray-800: #303033;
  --gray-700: #5b585d;
  --gray-500: #979499;
  --gray-400: #b7b4b9;
  --gray-300: #dddce1;
  --gray-200: #ebecee;
  --gray-100: #f5f5f5;
  
  /* Accent colors */
  --info: #3d9cab;
  --info-light: #43b2c5;
  --warning: #f8d326;
  --warning-dark: #f5a415;
  --danger: #e73c29;
  --danger-dark: #AB1D0D;
  --success: #38c657;
  
  /* Text colors */
  --body-color: #1b191c;
  --text-muted: #979499;
  
  /* Border radius */
  --border-radius: 5px;
  
  /* Theme colors */
  --navbar-bg: #303033;
  --navbar-text: #b2b2b2;
  --navbar-text-hover: white;
  --sidebar-bg: #3f3e42;
}

/* Base styles */
body {
  font-family: museo-sans-rounded, sans-serif;
  font-weight: 300;
  color: var(--body-color);
  background-color: var(--gray-100);
  padding-top: 0;
  padding-bottom: 2rem;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--gray-800);
}

.header {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.header h1 {
  font-weight: 700;
  color: var(--gray-800);
}

.lead {
  font-weight: 300;
  color: var(--gray-700);
}

/* Container styles */
.upload-container, 
.clarify-container, 
.result-container {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 0.125rem 0.25rem rgba(33, 36, 44, 0.08);
  margin-bottom: 2rem;
  border: 0;
}

/* Button styles */
.btn {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  font-size: 0.8125rem;
  border-radius: var(--border-radius);
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-primary:hover, 
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: none;
}

.btn-outline-secondary {
  border-color: var(--gray-500);
  color: var(--secondary);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: var(--secondary);
  background-color: rgba(151, 148, 153, 0.1);
  border-color: var(--gray-500);
  box-shadow: none;
}

.btn-link {
  color: var(--primary-dark);
  text-decoration: none;
}

.btn-link:hover,
.btn-link:focus {
  color: var(--primary);
  text-decoration: none;
}

/* Form styles */
.form-control {
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-300);
  padding: 0.75rem;
  font-size: 16px;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(167, 198, 56, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--gray-800);
}

/* Preview container */
.preview-container {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.preview-box {
  width: 48%;
  height: 200px;
  border: 2px dashed var(--gray-300);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  text-align: center;
  padding: 5px;
}

/* Instructions */
.instructions {
  margin-bottom: 1.5rem;
}

.instructions h4 {
  color: var(--gray-800);
  font-weight: 700;
}

.instructions ol {
  color: var(--gray-700);
  padding-left: 1.5rem;
}

/* Alert styles */
.alert {
  padding: 0;
  display: flex;
  border: 0;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(126, 142, 177, 0.12);
}

.alert-danger {
  background-color: #ffcdcf;
  color: var(--danger-dark);
}

.alert-info {
  background-color: #B7E7FC;
  color: #043F5D;
}

.alert-icon {
  padding: 0.95rem;
  background: hsla(0, 0%, 100%, 0.2);
}

.alert-message {
  padding: 0.95rem;
  width: 100%;
  box-sizing: border-box;
}

/* Image box styles for clarify page */
.image-box {
  width: 48%;
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius);
  padding: 10px;
  text-align: center;
}

.image-box img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.image-box h5 {
  color: var(--gray-800);
}

/* Form check styles */
.form-check-input {
  margin-top: 0.3rem;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-label {
  font-weight: 500;
  color: var(--gray-700);
}

/* Result page styles */
.result-image {
  text-align: center;
  margin-bottom: 2rem;
}

.result-image img {
  max-width: 100%;
  max-height: 500px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.original-images {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.original-image {
  width: 48%;
  text-align: center;
}

.original-image img {
  max-width: 100%;
  max-height: 250px;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-300);
}

.original-image h5 {
  margin-bottom: 1rem;
  color: var(--gray-800);
}

.actions {
  margin-top: 2rem;
  text-align: center;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.6);
  width: 100%;
  height: 100%;
  transition: ease-in-out 1s;
  z-index: 99999;
}

.loader-main-container {
  align-items: center;
  justify-content: center;
  display: flex;
  width: 100%;
  height: 100%;
}

.loading-content {
  background-color: rgb(255, 255, 255);
  box-shadow: 0 0.125rem 0.25rem rgba(31, 45, 61, 0.08);
  border-radius: 5px;
  padding: 10px;
  display: flex;
  max-width: 80%;
  height: 48px;
}

.loading-off {
  display: none;
}

.loading-on {
  display: block !important;
}

.loading-msg {
  line-height: 1.25rem;
  margin-bottom: 0;
}

.loader-spinner {
  width: 1.25rem;
  height: 1.25rem;
}

/* Navbar and footer styles */
.navbar-nav .nav-link:hover,
footer a:hover {
  color: white !important;
  transition: color 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .preview-container,
  .images-container,
  .original-images {
    flex-direction: column;
  }
  
  .preview-box,
  .image-box,
  .original-image {
    width: 100%;
    margin-bottom: 1rem;
  }
}
