/* ==========================================================================
   ROOH Collections - Bespoke Tailoring & Custom Request Modal Stylesheet
   Navy, warm gold, ivory palette with clear sections, responsive inputs,
   unit conversion badges, pill selectors, and file upload dropzone.
   ========================================================================== */

/* 1. Modal Overlay & Dialog Container */
.rooh-custom-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.rooh-custom-modal.is-open {
  display: flex !important;
}

.rooh-custom-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 45, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1;
}

.rooh-custom-modal__dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 660px;
  max-height: 92vh;
  margin: auto;
  display: flex;
  flex-direction: column;
}

.rooh-custom-modal__content {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #ebdfd0;
  box-shadow: 0 20px 60px rgba(12, 35, 64, 0.25);
  overflow-y: auto;
  padding: 34px 36px 36px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.rooh-custom-modal__content::-webkit-scrollbar {
  width: 6px;
}

.rooh-custom-modal__content::-webkit-scrollbar-track {
  background: #f8fafc;
}

.rooh-custom-modal__content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* 2. Header & Eyebrow */
.rooh-custom-modal__header {
  position: relative;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.rooh-custom-modal__eyebrow-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.rooh-custom-modal__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b8860b;
}

.rooh-custom-modal__eyebrow-line {
  height: 2px;
  width: 44px;
  background: #b8860b;
  display: inline-block;
}

.rooh-custom-modal__close {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0c2340;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.rooh-custom-modal__close:hover {
  background: #0c2340;
  color: #ffffff;
  border-color: #0c2340;
}

.rooh-custom-modal__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  color: #0c2340;
  margin: 0 0 6px;
  line-height: 1.25;
}

.rooh-custom-modal__subtitle {
  font-size: 13.5px;
  color: #556987;
  margin: 0;
  line-height: 1.45;
}

/* 3. Sections & Field Structure */
.rooh-cr-section {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}

.rooh-cr-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.rooh-cr-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.rooh-cr-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: #0c2340;
  margin: 0 0 4px;
}

.rooh-cr-section-desc {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.rooh-cr-row--two,
.rooh-cr-grid--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rooh-cr-field {
  margin-bottom: 16px;
}

.rooh-cr-field:last-child {
  margin-bottom: 0;
}

.rooh-cr-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #0c2340;
  margin-bottom: 6px;
}

.rooh-cr-label .rooh-req {
  color: #c92a2a;
}

.rooh-cr-label .rooh-unit-label {
  font-weight: 500;
  color: #64748b;
  font-size: 11.5px;
}

.rooh-cr-helper-text {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 6px;
}

/* 4. Inputs, Selects & Textareas */
.rooh-cr-input,
.rooh-cr-select,
.rooh-cr-textarea {
  width: 100%;
  height: 42px;
  border: 1px solid #dcd5ca;
  border-radius: 5px;
  padding: 8px 14px;
  font-size: 13.5px;
  color: #1a1a1a;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.rooh-cr-input:focus,
.rooh-cr-select:focus,
.rooh-cr-textarea:focus {
  border-color: #0c2340;
  outline: none;
  box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.08);
}

.rooh-cr-select-wrapper {
  position: relative;
  width: 100%;
}

.rooh-cr-select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #64748b;
  pointer-events: none;
}

.rooh-cr-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  cursor: pointer;
}

.rooh-cr-textarea {
  height: auto;
  min-height: 85px;
  resize: vertical;
  line-height: 1.45;
}

/* 5. Input with Unit Affix Badge */
.rooh-cr-input-affix {
  position: relative;
  display: flex;
  align-items: center;
}

.rooh-cr-input-affix .rooh-cr-input {
  padding-right: 44px;
  font-family: var(--rooh-price-font, 'Montserrat', sans-serif);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.rooh-unit-affix {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-left: 1px solid #dcd5ca;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  pointer-events: none;
  text-transform: lowercase;
}

/* 6. Inches / CM Unit Switcher */
.rooh-cr-unit-toggle {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  overflow: hidden;
  height: 32px;
  background: #f8fafc;
  flex-shrink: 0;
}

.rooh-cr-unit-btn {
  padding: 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rooh-cr-unit-btn.is-active {
  background: #0c2340;
  color: #ffffff;
}

/* 7. Interactive Pill Selectors */
.rooh-cr-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.rooh-cr-pill {
  padding: 8px 16px;
  border: 1px solid #dcd5ca;
  border-radius: 5px;
  background: #ffffff;
  color: #0c2340;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.rooh-cr-pill:hover {
  border-color: #0c2340;
  background: #faf8f5;
}

.rooh-cr-pill.is-active {
  background: #0c2340;
  color: #ffffff;
  border-color: #0c2340;
}

/* 8. Reference Image Dropzone */
.rooh-cr-dropzone {
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  padding: 16px 20px;
  text-align: center;
  background: #faf9f6;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}

.rooh-cr-dropzone:hover {
  border-color: #0c2340;
  background: #f4f2ec;
}

.rooh-cr-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.rooh-cr-dropzone__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #475569;
  font-size: 12.5px;
}

.rooh-cr-dropzone__content svg {
  color: #b8860b;
  flex-shrink: 0;
}

.rooh-cr-dropzone__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12.5px;
  color: #0c2340;
  font-weight: 600;
}

.rooh-cr-remove-file {
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}

/* 9. Measurement Helper Notice */
.rooh-cr-measuring-help-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fcfaf6;
  border: 1px solid #ebdfd0;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 12px;
  color: #555555;
  line-height: 1.45;
  margin-top: 14px;
}

.rooh-cr-measuring-help-bar svg {
  color: #b8860b;
  flex-shrink: 0;
  margin-top: 1px;
}

/* 10. Checkboxes & Privacy Note */
.rooh-cr-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.rooh-cr-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #0c2340;
  cursor: pointer;
  margin-top: 2px;
}

.rooh-cr-check-text strong {
  display: block;
  font-size: 13px;
  color: #0c2340;
  font-weight: 600;
}

.rooh-cr-check-text small {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.rooh-cr-privacy-note {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
  margin: 16px 0;
}

/* 11. Submit Button & Status */
.rooh-cr-submit-wrap {
  margin-top: 16px;
}

.rooh-cr-submit-btn {
  width: 100%;
  padding: 15px 24px;
  background: #0c2340;
  color: #ffffff;
  border: 1px solid #0c2340;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.rooh-cr-submit-btn:hover {
  background: #142f54;
  transform: translateY(-1px);
}

.rooh-cr-submit-arrow {
  font-size: 16px;
  transition: transform 0.2s ease;
}

.rooh-cr-submit-btn:hover .rooh-cr-submit-arrow {
  transform: translateX(4px);
}

.rooh-cr-form-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12.5px;
}

.rooh-cr-form-status.is-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* 12. Success Confirmation Screen */
.rooh-cr-success-state {
  text-align: center;
  padding: 30px 20px;
}

.rooh-cr-success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e6f4ea;
  color: #137333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: bold;
  margin: 0 auto 18px;
}

.rooh-cr-success-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: #0c2340;
  margin: 0 0 10px;
}

.rooh-cr-success-desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
  max-width: 460px;
  margin: 0 auto 24px;
}

.rooh-cr-done-btn {
  padding: 12px 36px;
  background: #0c2340;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.rooh-cr-done-btn:hover {
  background: #142f54;
}

/* 13. Responsive Mobile View */
@media (max-width: 640px) {
  .rooh-custom-modal__content {
    padding: 24px 20px 28px;
  }

  .rooh-custom-modal__title {
    font-size: 24px;
  }

  .rooh-cr-row--two,
  .rooh-cr-grid--two {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .rooh-cr-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .rooh-cr-unit-toggle {
    align-self: flex-start;
  }
}
