/*
 * DROIX contact form — base styles.
 * Everything sits inside :where() so specificity stays 0 and the child
 * themes' contact-page design (ct-* classes) always wins. Unthemed sites
 * (e.g. ayaneo.co) get a clean, neutral form from these rules alone.
 */
.dcf {
	--dcf-accent: #2f8f4e;
	--dcf-danger: #d93025;
	--dcf-border: rgba(0, 0, 0, .16);
	--dcf-muted: rgba(0, 0, 0, .55);
	--dcf-surface: rgba(0, 0, 0, .03);
	--dcf-radius: 10px;
}

:where(.dcf) .dcf-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
:where(.dcf) .dcf-form[hidden], :where(.dcf) .dcf-success[hidden], :where(.dcf) [hidden] { display: none !important; }

/* topics */
:where(.dcf) .dcf-topics { border: 0; margin: 0; padding: 0; min-width: 0; }
:where(.dcf) .dcf-topics legend { padding: 0; margin: 0 0 10px; font-weight: 600; }
:where(.dcf) .dcf-topic-list { display: flex; flex-wrap: wrap; gap: 9px; }
:where(.dcf) .dcf-topic { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--dcf-border); border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
:where(.dcf) .dcf-topic.on { border-color: var(--dcf-accent); color: var(--dcf-accent); }
.dcf .dcf-topic input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.dcf .dcf-topic:focus-within { outline: 2px solid var(--dcf-accent); outline-offset: 2px; }
:where(.dcf) .dcf-icon { width: 16px; height: 16px; flex: 0 0 auto; }

/* fields */
:where(.dcf) .ct-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { :where(.dcf) .ct-grid2 { grid-template-columns: 1fr; } }
:where(.dcf) .dcf-field { display: flex; flex-direction: column; gap: 6px; }
:where(.dcf) .dcf-field label, :where(.dcf) .dcf-label { font-weight: 600; font-size: 13px; }
:where(.dcf) .opt { font-weight: 400; color: var(--dcf-muted); }
:where(.dcf) .dcf-input { width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid var(--dcf-border); border-radius: var(--dcf-radius); font: inherit; }
:where(.dcf) textarea.dcf-input { min-height: 130px; resize: vertical; }
:where(.dcf) .has-error .dcf-input, :where(.dcf) .dcf-input[aria-invalid="true"] { border-color: var(--dcf-danger); }
:where(.dcf) .dcf-error { margin: 2px 0 0; font-size: 12.5px; color: var(--dcf-danger); }

/* attachments */
:where(.dcf) .dcf-dropzone { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px dashed var(--dcf-border); border-radius: var(--dcf-radius); background: var(--dcf-surface); font-size: 13.5px; }
:where(.dcf) .dcf-dropzone.is-over { border-color: var(--dcf-accent); }
:where(.dcf) .dcf-browse { color: var(--dcf-accent); font-weight: 600; text-decoration: underline; cursor: pointer; }
.dcf .dcf-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.dcf .dcf-file-input:focus-visible + * , .dcf .dcf-dropzone:focus-within { outline: 2px solid var(--dcf-accent); outline-offset: 2px; }
:where(.dcf) .dcf-hint { margin: 0; font-size: 12px; color: var(--dcf-muted); }
:where(.dcf) .dcf-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
:where(.dcf) .dcf-file { position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "thumb name rm" "thumb meta rm" "bar bar bar"; align-items: center; column-gap: 10px; padding: 8px 10px; border: 1px solid var(--dcf-border); border-radius: 8px; font-size: 13px; }
:where(.dcf) .dcf-file-thumb { grid-area: thumb; width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }
:where(.dcf) .dcf-file-name { grid-area: name; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
:where(.dcf) .dcf-file-meta { grid-area: meta; color: var(--dcf-muted); font-size: 12px; }
:where(.dcf) .dcf-file.is-failed .dcf-file-meta { color: var(--dcf-danger); }
:where(.dcf) .dcf-file-bar { grid-area: bar; height: 3px; margin-top: 6px; background: var(--dcf-surface); border-radius: 3px; overflow: hidden; }
:where(.dcf) .dcf-file-bar i { display: block; height: 100%; width: 0; background: var(--dcf-accent); transition: width .2s; }
:where(.dcf) .dcf-file.is-done .dcf-file-bar, :where(.dcf) .dcf-file.is-failed .dcf-file-bar { display: none; }
:where(.dcf) .dcf-file-remove { grid-area: rm; border: 0; background: none; font-size: 20px; line-height: 1; padding: 2px 6px; cursor: pointer; color: inherit; }

/* honeypot */
.dcf .dcf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* footer */
:where(.dcf) .dcf-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
:where(.dcf) .dcf-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.5; max-width: 42ch; margin: 0; cursor: pointer; }
:where(.dcf) .dcf-consent input { margin-top: 3px; flex: 0 0 auto; }
:where(.dcf) .dcf-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border: 0; border-radius: var(--dcf-radius); background: var(--dcf-accent); color: #fff; font-weight: 700; cursor: pointer; }
:where(.dcf) .dcf-submit[disabled] { opacity: .65; cursor: progress; }
.dcf.is-busy .dcf-submit .dcf-icon { animation: dcf-pulse 1s ease-in-out infinite; }
@keyframes dcf-pulse { 50% { opacity: .35; } }
@media (max-width: 560px) { :where(.dcf) .dcf-foot { flex-direction: column; align-items: stretch; } :where(.dcf) .dcf-submit { width: 100%; } }

/* status + success */
:where(.dcf) .dcf-status { margin: 0; padding: 11px 14px; border-radius: var(--dcf-radius); border: 1px solid var(--dcf-border); font-size: 13.5px; }
:where(.dcf) .dcf-status-error { border-color: var(--dcf-danger); color: var(--dcf-danger); }
:where(.dcf) .dcf-success { text-align: center; padding: 28px 12px; outline: none; }
:where(.dcf) .dcf-success-icon { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 50%; background: var(--dcf-accent); color: #fff; }
:where(.dcf) .dcf-success-icon .dcf-icon { width: 26px; height: 26px; }
:where(.dcf) .dcf-success-title { margin: 14px 0 6px; }
:where(.dcf) .dcf-success-text, :where(.dcf) .dcf-success-ref, :where(.dcf) .dcf-success-email { margin: 4px 0; }
:where(.dcf) .dcf-success-ref { font-weight: 700; }
:where(.dcf) .dcf-again { margin-top: 14px; padding: 10px 18px; border: 1px solid var(--dcf-border); border-radius: var(--dcf-radius); background: none; cursor: pointer; font: inherit; color: inherit; }

[dir="rtl"] .dcf .dcf-hp { left: auto !important; right: -9999px !important; }
