/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f0f4f8;
  color: #1a202c;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 12px; }

.form-layout {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.col-left {
  flex: 1.2;
  display: flex;
  flex-direction: column;
}

.col-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.section {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.section-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #4a5568;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Camera */
.camera-label { display: block; cursor: pointer; }

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #edf2f7;
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  flex: 1;
  min-height: 140px;
  color: #718096;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.preview-placeholder:active { background: #e2e8f0; }
.camera-icon { font-size: 2rem; }

.camera-label {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
}

.image-preview {
  width: 100%;
  flex: 1;
  object-fit: contain;
  border-radius: 12px;
  display: block;
  max-height: 100%;
}

.hidden-input { display: none; }
.hidden { display: none !important; }

/* Answer types */
.answer-types { display: flex; flex-direction: column; gap: 8px; }

.type-option {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.type-option input[type="radio"] { display: none; }

.type-label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  transition: all 0.15s;
}
.type-option input:checked + .type-label {
  border-color: #4299e1;
  background: #ebf8ff;
}

.type-icon { font-size: 1.1rem; flex-shrink: 0; }
.type-text { font-weight: 600; font-size: 0.9rem; }

/* Submit */
.submit-btn {
  width: 100%;
  padding: 16px;
  background: #4299e1;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 12px rgba(66,153,225,0.4);
}
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled, .submit-btn.loading { background: #90cdf4; cursor: not-allowed; }


.retry-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: none;
  border: 2px solid #fc8181;
  color: #c53030;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

/* Flash */
.flash-error {
  background: #fed7d7;
  color: #c53030;
  padding: 12px 16px;
  border-radius: 10px;
  margin: 12px 16px 0;
  font-size: 0.9rem;
}

/* Answer page */
.answer-box {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.answer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}
.answer-icon { font-size: 1.4rem; }
.answer-title { font-weight: 700; font-size: 1.1rem; }

.answer-content {
  line-height: 1.7;
  font-size: 0.97rem;
  color: #2d3748;
}
.answer-content p { margin-bottom: 10px; }

.error-box {
  background: #fff5f5;
  border: 1px solid #fc8181;
  border-radius: 12px;
  padding: 20px;
  color: #c53030;
  margin-bottom: 20px;
}

.back-btn {
  display: block;
  text-align: center;
  padding: 14px;
  background: #edf2f7;
  color: #4a5568;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.back-btn:active { background: #e2e8f0; }
