/* ═══════════════════════════════════════════════
   Roof Help — Frontend Styles
   All brand colors use var(--rh-color) for admin customisation.
   ═══════════════════════════════════════════════ */

/* ── Checkout: Upload + Message fields ── */
.rh-checkout-fields {
  background: #f7faf7;
  border: 2px solid var(--rh-color, #2c5f2d);
  border-radius: 8px;
  padding: 24px;
  margin: 20px 0 24px;
}
.rh-checkout-fields__title {
  margin: 0 0 6px;
  font-size: 1.2em;
  color: var(--rh-color, #2c5f2d);
}
.rh-checkout-fields__desc {
  margin: 0 0 16px;
  color: #555;
  font-size: 0.95em;
  line-height: 1.5;
}
.rh-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  border: 2px dashed #a3c4a5;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}
.rh-upload-label:hover {
  border-color: var(--rh-color, #2c5f2d);
  background: #f0f7f0;
}
.rh-upload-label__icon {
  font-size: 2em;
  margin-bottom: 6px;
}
.rh-upload-label__text {
  font-weight: 600;
  color: #333;
}
.rh-upload-label__hint {
  font-size: 0.85em;
  color: #888;
  margin-top: 4px;
}
.rh-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.rh-checkout-upload {
  position: relative;
  margin-bottom: 16px;
}

/* File list preview */
.rh-file-list {
  margin-top: 10px;
}
.rh-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 0.9em;
}
.rh-file-item__name {
  font-weight: 500;
}
.rh-file-item__size {
  color: #888;
  white-space: nowrap;
  margin-left: 12px;
}

/* Checkout message */
.rh-checkout-message label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95em;
}
.rh-checkout-message textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  font-size: 0.95em;
  resize: vertical;
}

/* ── Thank-you page ── */
.rh-thankyou {
  background: #f0f7f0;
  border-left: 4px solid var(--rh-color, #2c5f2d);
  border-radius: 4px;
  padding: 20px 24px;
  margin: 20px 0;
}
.rh-thankyou h3 {
  margin: 0 0 8px;
  color: var(--rh-color, #2c5f2d);
}
.rh-btn {
  display: inline-block;
  background: var(--rh-color, #2c5f2d) !important;
  color: #fff !important;
  padding: 10px 24px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  border: none !important;
  cursor: pointer;
}
.rh-btn:hover {
  opacity: 0.88;
}

/* ── Status Tracker ── */
.rh-status-tracker {
  margin: 20px 0 28px;
}
.rh-status-tracker__bar {
  display: flex;
  gap: 0;
  position: relative;
}
.rh-status-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding-top: 40px;
}
.rh-status-step::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  height: 3px;
  background: #ddd;
  z-index: 0;
}
.rh-status-step:first-child::before {
  left: 50%;
}
.rh-status-step:last-child::before {
  right: 50%;
}
.rh-status-step--done::before,
.rh-status-step--active::before {
  background: var(--rh-color, #2c5f2d);
}
.rh-status-step__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ddd;
  color: #888;
  font-weight: 700;
  font-size: 0.85em;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.rh-status-step--done .rh-status-step__dot {
  background: var(--rh-color, #2c5f2d);
  color: #fff;
}
.rh-status-step--active .rh-status-step__dot {
  background: var(--rh-color, #2c5f2d);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(44, 95, 45, 0.2);
}
.rh-status-step__label {
  font-size: 0.85em;
  color: #888;
  display: block;
  margin-top: 4px;
}
.rh-status-step--done .rh-status-step__label,
.rh-status-step--active .rh-status-step__label {
  color: var(--rh-color, #2c5f2d);
  font-weight: 600;
}

/* ── Sections ── */
.rh-section {
  margin: 20px 0;
  padding: 16px 20px;
  background: #fafafa;
  border-radius: 6px;
}
.rh-section--highlight {
  background: #f0f7f0;
  border-left: 4px solid var(--rh-color, #2c5f2d);
}
.rh-section h3 {
  margin: 0 0 10px;
}
.rh-file-list-view {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rh-file-list-view li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95em;
}
.rh-file-list-view li:last-child {
  border-bottom: 0;
}
.rh-file-icon {
  margin-right: 4px;
}
.rh-report-notes {
  margin-top: 10px;
  padding: 10px;
  background: #fff;
  border-radius: 4px;
}

/* ── Messages Thread ── */
.rh-messages-section {
  background: #fff;
  border: 1px solid #e0e0e0;
}
.rh-thread {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
  margin-bottom: 12px;
  background: #fafafa;
  border-radius: 4px;
}
.rh-thread__empty {
  color: #999;
  font-style: italic;
  text-align: center;
  padding: 20px;
}
.rh-bubble {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 80%;
  clear: both;
}
.rh-bubble--you {
  background: #e3f2fd;
  float: left;
  border-bottom-left-radius: 2px;
}
.rh-bubble--support {
  background: #e8f5e9;
  float: right;
  border-bottom-right-radius: 2px;
}
.rh-bubble::after {
  content: "";
  display: table;
  clear: both;
}
.rh-bubble__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  font-size: 0.85em;
}
.rh-bubble__header strong {
  margin-right: 8px;
}
.rh-bubble__header time {
  color: #999;
  font-size: 0.9em;
}
.rh-bubble__body {
  font-size: 0.95em;
  line-height: 1.5;
}
.rh-bubble__body p {
  margin: 0;
}

/* Reply form */
.rh-reply-form__row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.rh-reply-form__row textarea {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 0.95em;
  resize: none;
}
.rh-reply-form__row .rh-btn {
  white-space: nowrap;
}

/* File download links in messages */
.rh-file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #d5e5d5;
  border-radius: 6px;
  margin-top: 6px;
  font-size: 0.92em;
}
.rh-file-link a {
  color: var(--rh-color, #2c5f2d);
  font-weight: 600;
  text-decoration: none;
}
.rh-file-link a:hover {
  text-decoration: underline;
}
.rh-file-badge {
  display: inline-block;
  font-size: 0.75em;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 4px;
}
.rh-file-badge--report {
  background: var(--rh-color, #2c5f2d);
  color: #fff;
}

/* Notices */
.rh-notice {
  padding: 8px 14px;
  border-radius: 4px;
  margin-top: 8px;
}
.rh-notice--ok {
  background: #d4edda;
  color: #155724;
}
.rh-notice--err {
  background: #f8d7da;
  color: #721c24;
}
