/* ============================================================
   Elegance Forms — Frontend  (Elementor-safe, scoped to .ef-form-wrap)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300&family=Montserrat:wght@300;400;500;600&display=swap');

.ef-form-wrap {
  --ef-accent:       #c9a96e;
  --ef-accent-rgb:   201,169,110;
  --ef-dark:         #0f0f0f;
  --ef-mid:          #2a2a2a;
  --ef-muted:        #888;
  --ef-border:       #d8d0c4;
  --ef-bg:           #faf9f7;
  --ef-white:        #ffffff;
  --ef-serif:        'Cormorant Garamond', Georgia, serif;
  --ef-sans:         'Montserrat', sans-serif;
  --ef-shadow:       0 6px 40px rgba(0,0,0,0.09);
  --ef-tr:           all 0.22s cubic-bezier(0.4,0,0.2,1);
  font-family:       var(--ef-sans);
  color:             var(--ef-dark);
  background:        var(--ef-white);
  border:            1px solid var(--ef-border);
  border-top:        3px solid var(--ef-accent);
  border-radius:     2px;
  box-shadow:        var(--ef-shadow);
  overflow:          hidden;
  max-width:         800px;
  margin:            0 auto;
  -webkit-font-smoothing: antialiased;
}
.ef-form-wrap *, .ef-form-wrap *::before, .ef-form-wrap *::after { box-sizing: border-box; }
.ef-form-wrap input, .ef-form-wrap textarea, .ef-form-wrap select, .ef-form-wrap button {
  font-family: var(--ef-sans); outline: none; -webkit-appearance: none; -moz-appearance: none;
}

/* ---- Form body ---- */
.ef-form-body { padding: 44px 52px 12px; }

/* ---- Generic block ---- */
.ef-block { margin-bottom: 24px; }

/* ---- Heading ---- */
.ef-block-heading h2 {
  font-family: var(--ef-serif); font-size: 30px; font-weight: 300;
  letter-spacing: 0.5px; color: var(--ef-dark); margin: 0; line-height: 1.2;
}

/* ---- Text ---- */
.ef-block-text { font-size: 14px; line-height: 1.85; color: #555; font-weight: 300; }
.ef-block-text p { margin-bottom: 10px; }

/* ---- Image ---- */
.ef-block-image { line-height: 0; }
.ef-block-image img { max-width: 100%; height: auto; display: block; width: auto; }
.ef-block-image .ef-img-caption {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ef-accent, #c9a96e);
    margin-bottom: 6px;
    line-height: 1.4;
}

/* ---- Divider ---- */
.ef-block-divider hr { border: none; border-top: 1px solid var(--ef-border); margin: 4px 0; }

/* ---- Spacer ---- */
.ef-block-spacer { height: 20px; }

/* ============================================================
   COLUMNS
   ============================================================ */
.ef-block-columns { display: flex; gap: 24px; align-items: flex-start; }
.ef-cols-1 { flex-direction: column; }
.ef-cols-2 .ef-col { flex: 1 1 0; min-width: 0; }
.ef-cols-3 .ef-col { flex: 1 1 0; min-width: 0; }
.ef-col > .ef-block:last-child { margin-bottom: 0; }

/* Columns on mobile: stack */
@media (max-width: 600px) {
  .ef-block-columns { flex-direction: column; }
  .ef-cols-2 .ef-col, .ef-cols-3 .ef-col { flex: 1 1 100%; }
}

/* ============================================================
   INLINE TEXT FIELD
   e.g. "I, ___________, hereby agree..."
   ============================================================ */
.ef-block-inline-text {
  background: var(--ef-bg);
  border: 1px solid var(--ef-border);
  border-left: 3px solid var(--ef-accent);
  border-radius: 2px;
  padding: 16px 20px;
}

.ef-inline-para {
  font-size: 14px;
  line-height: 2.2;
  color: #444;
  margin: 0;
}

.ef-inline-field-wrap { display: inline-block; position: relative; vertical-align: bottom; }

.ef-inline-input {
  display: inline-block;
  border: none !important;
  border-bottom: 2px solid var(--ef-accent) !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 4px 2px !important;
  font-size: 14px !important;
  font-family: var(--ef-sans) !important;
  color: var(--ef-dark) !important;
  text-align: center;
  min-width: 80px;
  width: auto;
  transition: var(--ef-tr);
  box-shadow: none !important;
}
.ef-inline-input:focus {
  background: rgba(var(--ef-accent-rgb), 0.06) !important;
  border-bottom-color: var(--ef-dark) !important;
  outline: none !important;
}
.ef-inline-input::placeholder { color: #bbb; font-style: italic; }

/* ============================================================
   FORM FIELDS
   ============================================================ */
.ef-block-field { position: relative; }

.ef-field-label {
  display: block; font-size: 10px; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--ef-muted);
  margin-bottom: 7px; transition: var(--ef-tr);
}
.ef-required-star { color: var(--ef-accent); margin-left: 2px; }

.ef-field-input {
  width: 100%; padding: 11px 14px; font-size: 14px; font-weight: 400;
  color: var(--ef-dark); background: var(--ef-bg);
  border: 1px solid var(--ef-border);
  border-bottom: 2px solid var(--ef-border);
  border-radius: 2px; transition: var(--ef-tr); line-height: 1.4;
}
.ef-field-input:focus {
  background: var(--ef-white);
  border-color: var(--ef-border);
  border-bottom-color: var(--ef-accent);
  box-shadow: 0 2px 0 0 var(--ef-accent);
}
.ef-block-field:focus-within .ef-field-label { color: var(--ef-accent); }

.ef-field-textarea { resize: vertical; min-height: 96px; }

.ef-field-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}

.ef-field-error { border-color: #e05c5c !important; border-bottom-color: #e05c5c !important; }

/* Checkbox */
.ef-checkbox-wrap { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.ef-field-checkbox { width:18px; height:18px; flex-shrink:0; border:2px solid var(--ef-border); background:var(--ef-bg); cursor:pointer; margin-top:1px; accent-color:var(--ef-accent); }
.ef-checkbox-label { font-size: 13px; line-height: 1.6; color: #555; cursor: pointer; }

/* ============================================================
   SIGNATURE
   ============================================================ */
.ef-block-signature { margin-top: 8px; }
.ef-sig-label { font-size: 10px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: var(--ef-muted); margin-bottom: 10px; }
.ef-sig-wrap { border: 1px solid var(--ef-border); border-bottom: 2px solid var(--ef-accent); border-radius: 2px; background: var(--ef-bg); overflow: hidden; }
.ef-sig-canvas { width: 100%; height: 160px; display: block; cursor: crosshair; touch-action: none; }
.ef-sig-actions { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--ef-border); background: var(--ef-white); }
.ef-sig-clear { font-size: 11px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ef-muted); background: none; border: none; cursor: pointer; padding: 4px 0; transition: var(--ef-tr); }
.ef-sig-clear:hover { color: var(--ef-accent); }
.ef-sig-hint { font-size: 11px; color: #ccc; font-style: italic; }
.ef-sig-error { border-color: #e05c5c !important; border-bottom-color: #e05c5c !important; }

/* ============================================================
   FOOTER / SUBMIT
   ============================================================ */
.ef-form-footer { padding: 20px 52px 44px; display: flex; justify-content: flex-end; }

.ef-submit-btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 52px; font-family: var(--ef-sans); font-size: 11px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase; color: var(--ef-white);
  background: var(--ef-dark); border: 2px solid var(--ef-dark); border-radius: 2px;
  cursor: pointer; transition: var(--ef-tr); overflow: hidden;
}
.ef-submit-btn::before { content: ''; position: absolute; inset: 0; background: var(--ef-accent); transform: scaleX(0); transform-origin: left; transition: transform 0.4s cubic-bezier(0.4,0,0.2,1); }
.ef-submit-btn:hover::before { transform: scaleX(1); }
.ef-submit-btn:hover { border-color: var(--ef-accent); }
.ef-submit-text, .ef-submit-loading { position: relative; z-index: 1; }

.ef-spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; animation: ef-spin 0.7s linear infinite; vertical-align: middle; }
@keyframes ef-spin { to { transform: rotate(360deg); } }

/* Messages */
.ef-form-messages { margin: 0 52px 24px; padding: 12px 16px; font-size: 13px; border-radius: 2px; border-left: 3px solid; }
.ef-form-messages.ef-msg-error { background: #fff5f5; border-color: #e05c5c; color: #c0392b; }
.ef-form-messages.ef-msg-success { background: #f5fff8; border-color: #5cb87a; color: #1e7a40; }

/* ============================================================
   SUCCESS STATE
   ============================================================ */
.ef-success-state { padding: 72px 52px; text-align: center; }
.ef-success-icon { font-size: 48px; color: var(--ef-accent); margin-bottom: 20px; animation: ef-pop 0.5s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes ef-pop { from { transform:scale(0); opacity:0; } to { transform:scale(1); opacity:1; } }
.ef-success-title { font-family: var(--ef-serif); font-size: 30px; font-weight: 300; letter-spacing: 1px; margin-bottom: 12px; }
.ef-success-msg { font-size: 14px; color: #666; line-height: 1.7; margin-bottom: 28px; }
.ef-download-btn { display: inline-block; padding: 14px 40px; font-size: 11px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: var(--ef-white); background: var(--ef-dark); text-decoration: none; border-radius: 2px; transition: var(--ef-tr); }
.ef-download-btn:hover { background: var(--ef-accent); color: var(--ef-white); text-decoration: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .ef-form-body, .ef-form-footer { padding-left: 20px; padding-right: 20px; }
  .ef-block-heading h2 { font-size: 22px; }
  .ef-submit-btn { width: 100%; justify-content: center; }
  .ef-form-messages { margin-left: 20px; margin-right: 20px; }
  .ef-success-state { padding: 44px 20px; }
}

/* Elementor overrides */
.elementor-widget-elegance_form .ef-form-wrap { margin: 0; }
.elementor .ef-field-input { font-size: 14px !important; }
.elementor .ef-submit-btn { font-family: var(--ef-sans) !important; }
.ef-elementor-placeholder { padding: 40px; text-align: center; border: 2px dashed #d8d0c4; color: #aaa; font-size: 13px; border-radius: 2px; }

/* ============================================================
   WELCOME SCREEN
   ============================================================ */
.ef-welcome { padding: 56px 52px; text-align: center; }
.ef-welcome-inner { max-width: 600px; margin: 0 auto; }
.ef-welcome .ef-block-heading h2 { text-align: center; }
.ef-welcome .ef-block-text { text-align: center; }
.ef-welcome-pw { margin: 24px 0 8px; }
.ef-welcome-pw-input {
  width: 100%; max-width: 320px; padding: 13px 16px; font-size: 14px;
  text-align: center; letter-spacing: 2px;
  border: 1px solid var(--ef-border); border-bottom: 2px solid var(--ef-accent);
  border-radius: 2px; background: var(--ef-bg); color: var(--ef-dark);
}
.ef-welcome-pw-input:focus { outline: none; background: #fff; }
.ef-welcome-pw-error { color: #c0392b; font-size: 12px; margin-top: 8px; }
.ef-welcome-start {
  display: inline-block; margin-top: 28px; padding: 16px 56px;
  font-family: var(--ef-sans); font-size: 11px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase; color: #fff;
  background: var(--ef-dark); border: 2px solid var(--ef-dark);
  border-radius: 2px; cursor: pointer; transition: var(--ef-tr); position: relative; overflow: hidden;
}
.ef-welcome-start::before { content:''; position:absolute; inset:0; background:var(--ef-accent); transform:scaleX(0); transform-origin:left; transition:transform .4s cubic-bezier(.4,0,.2,1); }
.ef-welcome-start:hover::before { transform:scaleX(1); }
.ef-welcome-start:hover { border-color: var(--ef-accent); }
.ef-welcome-start > * { position: relative; z-index: 1; }
.ef-welcome-start[disabled] { opacity: 0.6; cursor: wait; }

/* Video embed */
.ef-block-video { margin: 20px 0; }
.ef-video-embed { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; border-radius: 2px; overflow: hidden; }
.ef-video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ============================================================
   RADIO / CHECKBOX GROUPS
   ============================================================ */
.ef-block-choice .ef-field-label { margin-bottom: 12px; }
.ef-choice-options { display: flex; flex-direction: column; gap: 10px; }
.ef-choice-option { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; color: #444; }
.ef-choice-input { position: absolute; opacity: 0; width: 0; height: 0; }
.ef-choice-mark {
  width: 20px; height: 20px; flex-shrink: 0; border: 2px solid var(--ef-border);
  background: var(--ef-bg); transition: var(--ef-tr); position: relative;
}
.ef-choice-radio .ef-choice-mark { border-radius: 50%; }
.ef-choice-multi .ef-choice-mark { border-radius: 3px; }
.ef-choice-option:hover .ef-choice-mark { border-color: var(--ef-accent); }
.ef-choice-input:checked + .ef-choice-mark { border-color: var(--ef-accent); background: var(--ef-accent); }
.ef-choice-input:checked + .ef-choice-mark::after {
  content: ''; position: absolute; inset: 0; margin: auto;
}
.ef-choice-radio .ef-choice-input:checked + .ef-choice-mark::after {
  width: 8px; height: 8px; border-radius: 50%; background: #fff; top: 50%; left: 50%; transform: translate(-50%,-50%); position: absolute;
}
.ef-choice-multi .ef-choice-input:checked + .ef-choice-mark::after {
  width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg); top: 2px; left: 6px; position: absolute;
}
.ef-choice-text { line-height: 1.4; }
.ef-block-choice.ef-choice-error .ef-choice-mark { border-color: #e05c5c; }

/* Inline date input */
.ef-inline-date {
  border: none !important; border-bottom: 2px solid var(--ef-accent) !important;
  border-radius: 0 !important; background: transparent !important;
  padding: 0 4px 2px !important; font-family: var(--ef-sans) !important;
  font-size: 13px !important; color: var(--ef-dark) !important;
}

/* Rich text inside heading/text blocks */
.ef-block-heading h2 b, .ef-block-heading h2 strong { font-weight: 700; }
.ef-block-text b, .ef-block-text strong { font-weight: 600; }
.ef-block-text u, .ef-inline-para u { text-decoration: underline; }

/* ============================================================
   INVISIBLE BLOCK — frontend (v1.4.5)
   Takes up normal space but is not visible on the published page.
   The block IS rendered in the PDF (handled server-side).
   ============================================================ */
.ef-invisible-block {
  visibility: hidden;
}
