.dda-input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.dda-input-label {
    font-size: var(--dda-fs-title-sm);
    color: var(--dda-on-surface-0);
    line-height: 22px;
    font-weight: var(--dda-fw-400);
}
.light-mode .dda-input-label {
    color: var(--dda-neutral-0);
}
.dda-input-field-wrapper {
    position: relative;
}

.dda-field-group-input {
    height: 32px;
    background-color: transparent;
    flex: 1;
    /* An input's intrinsic width would otherwise stop it shrinking and push the row past its container. */
    min-width: 0;
    font-size: var(--dda-fs-body-lg);
    font-weight: var(--dda-fw-400);
    padding: 0px;
    color: var(--dda-on-surface-0);
    border: none;
    outline: none;
}
.light-mode .dda-field-group-input{
    color: var(--dda-neutral-0);
} 
.dda-input-field-group {
    width: 100%;
    height: 55px;
    padding: 8px 16px;
    background: var(--dda-surface-100);
    border: 1px solid var(--dda-surface-90);
    border-radius: 8px;
    font-size: var(--dda-fs-body-lg);
    color: var(--dda-on-surface-0);
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}
.light-mode .dda-input-field-group{
    background: var(--dda-neutral-100);
    border: 1px solid var(--dda-neutral-90);
    color: var(--dda-neutral-0);
}
.dda-input-field {
    width: 100%;
    height: 55px;
    padding: 8px 16px;
    background: var(--dda-surface-100);
    border: 1px solid var(--dda-surface-90);
    border-radius: 8px;
    font-size: var(--dda-fs-body-lg);
    color: var(--dda-on-surface-0);
    font-weight: var(--dda-fw-400);
}
.light-mode .dda-input-field{
    background: var(--dda-neutral-100);
    border: 1px solid var(--dda-neutral-90);
    color: var(--dda-neutral-0);
}

/*
 * WCAG 1.4.3 placeholder contrast. The global `::placeholder` colour in
 * global.css (#8E9191) is 3.18:1 on the white field background. The
 * theme-aware --dda-on-surface-variant-40 is 6.49:1 on surface-100 in the
 * light theme (#56605F on #FFFFFF) and 7.46:1 in the dark theme (#A3ADAC on
 * #191C1C). `.light-mode` forces a white field, so it uses the raw light
 * step. Kept above the validation-error and disabled placeholder rules so
 * those still win at equal specificity.
 */
.dda-input-field::-ms-input-placeholder,
.dda-field-group-input::-ms-input-placeholder {
    color: var(--dda-on-surface-variant-40);
}

.dda-input-field::placeholder,
.dda-field-group-input::placeholder {
    color: var(--dda-on-surface-variant-40);
}

.light-mode .dda-input-field::-ms-input-placeholder,
.light-mode .dda-field-group-input::-ms-input-placeholder {
    color: var(--dda-neutral-variant-40);
}

.light-mode .dda-input-field::placeholder,
.light-mode .dda-field-group-input::placeholder {
    color: var(--dda-neutral-variant-40);
}
.dda-input-size-small .dda-input-field-group,
.dda-input-size-small .dda-input-field {
    height: 48px;
    padding: 8px 12px;
}

/*
 * Focused field: teal border and a pale halo. The phone field keeps this look
 * while it holds a number, and the halo is 1.16:1 on white and 1.31:1 on
 * #191C1C, so neither is the focus indicator. The ring below is.
 */
.dda-input-focus-filled .dda-phone-field,
.dda-input-focus .dda-input-field-group,
.dda-input-field:focus {
    border-color: var(--dda-color-primary-40);
    box-shadow: 0px 0px 0px 3px var(--dda-primary-variant-95);
}
.light-mode.dda-input-focus-filled .dda-phone-field,
.light-mode.dda-input-focus .dda-input-field-group,
.light-mode .dda-input-field:focus {
    border-color: var(--dda-primary-40);
    box-shadow: 0px 0px 0px 3px var(--dda-primary-95);
}

/*
 * WCAG 2.4.7 / 1.4.11 focus ring for every field: dda-input, dda-textarea,
 * dda-select's and dda-dropdown's trigger, dda-search-input,
 * dda-creditcard-field (.dda-input-field), and the dda-phonefield and
 * dda-number-field groups (.dda-input-focus, set while the inner input has
 * focus). It used to be `outline: none` plus the halo above, so the only cue
 * was the 1px border turning teal.
 *
 * A real outline, not a box-shadow: Windows forced-colors mode drops
 * box-shadow and paints every border one colour, but draws the outline in a
 * system colour, so the ring still shows there. The halo fills the 2px gap
 * between border and ring. Ring contrast (WCAG ratio):
 *   light, #006A67: 6.45:1 on the page (#FFFFFF), 5.54:1 on the halo
 *     (#D0F5F4), 4.99:1 on the resting border (#E0E3E2), and at least 4.99:1
 *     on every light surface step (surface-96 to surface-90).
 *   dark, #21BEBA: 7.47:1 on the page (#191C1C), 5.72:1 on the halo
 *     (#003735), 5.39:1 on the resting border (#323535), and at least 5.02:1
 *     on every dark surface step.
 *   .light-mode, #006A67: as light. On a dark-theme page (#191C1C) the ring
 *     is 2.66:1 against the page, but the halo inside it is 14.74:1, so the
 *     two read as one band.
 * Error and disabled fields take the white+dark ring instead (end of file).
 */
.dda-input-focus .dda-input-field-group,
.dda-input-field:focus-visible {
    outline: 2px solid var(--dda-color-primary-40);
    outline-offset: 2px;
}
.light-mode.dda-input-focus .dda-input-field-group,
.light-mode .dda-input-field:focus-visible {
    outline-color: var(--dda-primary-40);
}
/* A pointer click on a <button> field (the select and dropdown triggers) is
   not :focus-visible: it gets the teal border only, and no site-wide
   `button:focus` outline either. */
.dda-input-field:focus:not(:focus-visible) {
    outline: none;
}

.dda-input-dropdown-btn {
    min-width: 110px;
    flex-shrink: 0;
    position: relative;
    display: inline-block;
    padding: 0;
}

.dda-dropdown-select {
    width: 100%;
    height: 32px;
    display: flex;
    justify-content: space-between;
    background: transparent;
    border: transparent;
    font-size: var(--dda-fs-body-lg);
    color: var(--dda-on-surface-0);
    padding: 0;
    align-items: center;
    cursor: pointer;
    gap: 6px;
}
.light-mode .dda-dropdown-select{
    color: var(--dda-neutral-0);
}

.dda-dropdown-select img {
    width: 24px;
}


.dda-dropdown-container {
    position: relative;
    width: auto;
    /* min-width: 140px; */
}
.dda-dropdown-container.bg-transparent .dda-dropdown-header{
    padding: 0px;
    height: auto;
    background: transparent;
    border: transparent;
    box-shadow: none;
}
.dda-dropdown-header {
    width: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}
.dda-dropdown-header .three-dots{
    font-size: 25px;
    color: var(--dda-neutral-variant-60);
}
.dda-dropdown-header .three-dots path{
    fill: var(--dda-neutral-variant-60);
}
.dda-dropdown-header .dda-dropdown-text{
    flex: 1;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}
.dda-dropdown-header .dda-dropdown-text span{
    color: var(--dda-on-surface-variant-30);
    display: flex;
    align-items: center;
}
.light-mode .dda-dropdown-text span{
    color: var(--dda-neutral-variant-30);
}
.dda-dropdown-header .dda-dropdown-text i{
    font-size: 31px;
}
.dda-dropdown-header .dda-dropdown-text path{
    fill: var(--dda-on-surface-variant-30);
}
.light-mode .dda-dropdown-header .dda-dropdown-text path{
    fill: var(--dda-neutral-variant-30);
}
.dda-dropdown-header:focus .three-dots path{
    fill: var(--dda-on-surface-variant-30);
}
.dda-input-dropdown-list {
    width: 100%;
    min-width: 150px;
    max-height: 200px;
    background-color: var(--dda-neutral-100);
    border: 1px solid var(--dda-neutral-90);
    border-radius: 8px;
    overflow-y: auto;
    position: absolute;
    top: 100%;
    margin-top: 1px;
    inset-inline-start: 0px;
    z-index: 9999;
    box-shadow: 0px 8px 10px -6px #1018281A;
}

.dda-input-dropdown-list::-webkit-scrollbar-track {
    border-radius: 4px;
}

.dda-input-dropdown-list::-webkit-scrollbar {
    width: 4px;
}

.dda-input-dropdown-list::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: var(--dda-neutral-variant-30);
}

.dda-input-dropdown-item {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    font-size: var(--dda-fs-body-lg);
    background: transparent;
    border: transparent;
    padding: 10px;
    cursor: pointer;
}

.dda-input-dropdown-item:hover {
    background-color: var(--dda-neutral-variant-95);
    outline: 0;
}

.dda-helper-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--dda-fs-body-md);
    color: var(--dda-on-surface-variant-30);
}
.light-mode .dda-helper-text{
    color: var(--dda-neutral-30);
}
.dda-error-message {
    display: flex;
    justify-content: space-between;
    font-size: var(--dda-fs-body-md);
    color: var(--dda-color-error-40);
}

.dda-helper-text i,
.dda-helper-text svg,
.dda-error-message i,
.dda-error-message svg  {
    font-size: 24px;
}

.dda-validation-error .dda-input-field-group,
.dda-validation-error .dda-input-field {
    color: var(--dda-color-error-40);
    border-color: var(--dda-color-error-40);
    box-shadow: none;
}

.light-mode.dda-validation-error .dda-input-field-group,
.light-mode.dda-validation-error .dda-input-field {
    color: var(--dda-error-40);
    border-color: var(--dda-error-40);
    box-shadow: none;
}

.dda-validation-error .icon-close,
.dda-validation-error .dda-error-message,
.dda-validation-error .dda-field-group-input,
.dda-validation-error .dda-file-input span {
    color: var(--dda-color-error-40) !important;
}

.light-mode.dda-validation-error .icon-close,
.light-mode.dda-validation-error .dda-error-message,
.light-mode.dda-validation-error .dda-field-group-input,
.light-mode.dda-validation-error .dda-file-input span {
    color: var(--dda-error-40) !important;
}

.dda-validation-error .dda-input-field::-ms-input-placeholder,
.dda-validation-error .dda-field-group-input::-ms-input-placeholder {
    color: var(--dda-color-error-40);
}

.light-mode.dda-validation-error .dda-input-field::-ms-input-placeholder,
.light-mode.dda-validation-error .dda-field-group-input::-ms-input-placeholder {
    color: var(--dda-error-40);
}

.dda-validation-error .dda-input-field::placeholder,
.dda-validation-error .dda-field-group-input::placeholder {
    color: var(--dda-color-error-40);
}

.light-mode.dda-validation-error .dda-input-field::placeholder,
.light-mode.dda-validation-error .dda-field-group-input::placeholder {
    color: var(--dda-error-40);
}

.dda-input-disabled .dda-input-label,
.dda-input-disabled .dda-helper-text,
.dda-input-disabled .dda-error-message,
.dda-input-disabled i,
.dda-input-disabled .dda-dropdown-select,
.dda-input-disabled .dda-file-input span,
.dda-input-disabled .dda-file-choose {
    color: var(--dda-on-surface-muted) !important;
}

.dda-input-disabled .dda-input-field-group,
.dda-input-disabled .dda-input-field {
    background: var(--dda-surface-92);
    border-color: var(--dda-neutral-90);
    color: var(--dda-on-surface-muted) !important;
    box-shadow: none;
    pointer-events: none;
}
.dda-input-disabled i{
    color: var(--dda-neutral-variant-60);
}
.dda-input-disabled svg path{
    fill: var(--dda-neutral-variant-60);
}
.dda-input-disabled .dda-input-field::-ms-input-placeholder {
    color: var(--dda-on-surface-muted);
}

.dda-input-disabled .dda-input-field::placeholder {
    color: var(--dda-on-surface-muted);
}

.dda-input-disabled .dda-btn {
    background-color: var(--dda-neutral-70) !important;
    border-color: var(--dda-neutral-70) !important;
}

.dda-input-disabled .dda-dropdown-select img,
.dda-input-disabled .dda-input-field-wrapper img {
    filter: grayscale(1);
}

/*Specifications*/

/*Number Field*/
.dda-number-field .dda-field-group-input {
    padding-inline-end: 10px;
    border-inline-end: solid 1px var(--dda-neutral-90);
}

.dda-number-field .dda-field-group-input:focus,
.dda-phone-field .dda-field-group-input:focus {
    border-inline-start: solid 1px var(--dda-color-primary-40);
}

.dda-number-field .dda-input-dropdown-btn {
    min-width: 80px;
}

.dda-number-field .dda-input-dropdown-list {
    top: 44px;
}

.dda-input-size-small .dda-number-field .dda-input-dropdown-list {
    top: 41px;
}

/*text ares*/
.dda-input-textarea {
    height: auto;
    min-height: 120px;
    resize: vertical;
}

/*Search Field*/
.dda-search-area {
    position: relative;
}

.dda-search-area .icon-left {
    position: absolute;
    top: 16px;
    inset-inline-start: 15px;
    font-size: 24px;
    color: var(--dda-on-surface-variant-30);
}

.light-mode .dda-search-area .icon-left{
    color: var(--dda-neutral-variant-30);
}

.dda-input-size-small .dda-search-area .icon-left {
    top: 14px;
}

.dda-search-area .dda-search-btngroup {
    height: 40px;
    position: absolute;
    top: 7px;
    inset-inline-end: 7px;
    display: inline-flex;
    align-items: center;
}

.dda-input-size-small .dda-search-btngroup {
    top: 4px;
}

.dda-search-area .icon-close {
    display: flex;
    color: var(--dda-on-surface-variant-30);
    font-size: 20px;
    margin: 0px;
    margin-inline-end: 15px;
    padding: 0px;
    background: none;
    border: 0;
    cursor: pointer;
}

.light-mode .dda-search-area .icon-close{
    color: var(--dda-neutral-variant-30);
}

.dda-search-field {
    padding: 8px 40px 8px 40px;
}

.dda-search-action .dda-search-field {
    padding: 8px 110px 8px 40px;
}

.dda-search-sm .icon-left {
    top: 14px;
}

.dda-search-sm .dda-search-btngroup {
    top: 4px;
}

/*Phone Field*/
.dda-phone-field-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dda-phone-field-group.dda-phone-field-small {
    height: 48px;
}

.dda-phone-field-group.focused,
.dda-phone-field-group.filled {
    outline: none;
    border-color: var(--dda-color-primary-40);
    box-shadow: 0px 0px 0px 3px var(--dda-primary-variant-95);
}

.dda-phone-field-group.error {
    border-color: var(--dda-color-error-40);
    box-shadow: none;
}

.phone-field-country-code {
    border: none;
    background: none;
    margin-inline-end: 0.5rem;
    font-size: 1rem;
    color: var(--dda-on-surface-0);
}

.phone-field-country-code:focus-within {
    outline: 0;
}

.dda-phone-field .dda-input-dropdown-list {
    top: 44px;
}

.dda-input-size-small .dda-phone-field .dda-input-dropdown-list {
    top: 41px;
}

/*Credit Card Field*/
.dda-credit-card-field .dda-creditcard-icon {
    width: 40px;
    position: absolute;
    top: 14px;
    inset-inline-start: 15px;
}

.dda-input-size-small .dda-creditcard-icon {
    top: 11px;
}

.dda-credit-card-field .dda-input-field {
    padding: 8px 16px 8px 65px;
}

/*Select Field*/
.dda-select-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.dda-select-header i {
    font-size: 28px;
    color: var(--dda-on-surface-variant-30);
}

/*Rich Text Editor*/
.dda-input-container.dda-richtext-editor {
    gap: 0px;
}

.dda-richtext-editor .dda-input-label {
    margin-bottom: 8px;
}

.dda-richtext-editor .dda-helper-text,
.dda-richtext-editor .dda-error-message {
    margin-top: 8px;
}

.dda-richtext-editor .ql-toolbar.ql-snow {
    border: 1px solid var(--dda-neutral-90) !important;
    border-radius: 8px 8px 0 0;
}

.dda-richeditor-field {
    border: 1px solid var(--dda-neutral-90) !important;
    border-radius: 0 0 8px 8px;
}

.dda-richeditor-field .ql-editor {
    height: 100px;
    font-size: var(--dda-fs-body-lg);
}

/*Attach Files*/

.dda-input-field-group.dda-attach-file {
    padding-inline-end: 6px;
}

.dda-file-input {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dda-file-input span {
    font-size: var(--dda-fs-body-lg);
    color: var(--dda-on-surface-variant-30);
}
.light-mode .dda-file-input span{
    color: var(--dda-neutral-variant-30);
}
.dda-file-choose {
    height: 40px;
    background-color: var(--dda-surface-100);
    border: solid 1px var(--dda-neutral-90);
    color: var(--dda-color-primary-40);
    font-weight: var(--dda-fw-500);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.light-mode .dda-file-choose {
    color: var(--dda-primary-40);
}

.dda-input-disabled .dda-file-choose {
    background-color: var(--dda-surface-94);
}

/*
 * WCAG 2.1.1 / 4.1.2: the native file input was `display: none`, so it was
 * out of the tab order and the accessibility tree. It is now visually hidden
 * but focusable; keyboard focus shows the ring on the visible control after
 * it ("Choose File", or the chosen file's details).
 */
.dda-attach-file input[type='file'] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}

.dda-attach-file input[type='file']:focus-visible + .dda-file-input .dda-file-choose,
.dda-attach-file input[type='file']:focus-visible + .dda-file-details {
    /* Transparent, not none: forced-colors mode drops the box-shadow but paints this outline. */
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.65);
}

.dda-file-details {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline-end: 10px;
}

.dda-file-icon {
    width: 34px;
    height: 34px;
}

.dda-items {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dda-file-details .remove-file{
    margin: 0;
    padding: 0;
    background: transparent;
    border: transparent;
}
.dda-file-details .remove-file svg{
    font-size: var(--dda-fs-body-lg);
}
.dda-file-name {
    font-size: var(--dda-fs-body-lg);
}

.dda-remove-file {
    font-size: 20px;
    background: transparent;
    border: transparent;
    color: var(--dda-on-surface-variant-30);
    cursor: pointer;
    padding: 0px;
}

/**
 * WCAG 2.4.7/1.4.11 focus-visible repair (Task 9d: F-021).
 *
 * `.dda-validation-error .dda-input-field` and `.dda-input-disabled
 * .dda-input-field` (above) both set `box-shadow: none` unconditionally,
 * regardless of focus state, at the same or higher specificity than the
 * base `.dda-input-field:focus` ring (line ~78) - so on these two states
 * the ring never rendered at all. Neither state's story sets the real
 * `disabled` attribute on the underlying <input>/<textarea>/<button>, so
 * these remain real, reachable Tab stops. `.dda-dropdown-container.bg-
 * transparent .dda-dropdown-header` has the same defect by a different
 * route: `box-shadow: none` at *higher* specificity than the base ring it
 * shares via its own `dda-input-field` class. `.ql-editor` (Quill's rich-
 * text region, dda-textarea's enable_rich_editor mode) never had a focus
 * rule of any kind - it carries no dda-* class at all.
 *
 * `.dda-input-dropdown-item:focus-visible` (Task: final-fix-wave, F-002's
 * arrow-navigable dda-select option list): was paired with `:hover` at
 * line ~213, `outline: 0`, background-only - 1.13:1 against the list
 * background, identical to the `:hover` state, so a keyboard user could
 * not tell focus from a stray pointer. Split from `:hover` and given the
 * same double-ring here instead. Shared by dda-select, dda-avatar,
 * dda-phonefield and dda-number-field's option lists, all of which use
 * this one class.
 *
 * Each fix below adds `:focus-visible` to the exact selector that broke
 * the ring, which raises its specificity strictly above the offending rule
 * (or, for the validation-error case, ties the `.light-mode` variant's
 * specificity - placed at the end of the file so source order also
 * resolves in its favour). Same white+dark double-ring idiom as
 * `.dda-btn:focus-visible` (dda-button.css) and dda-home-banner's
 * `.slider-nav *:focus-visible` (home-banner.css:182-187) - one focus-ring
 * recipe reused everywhere. Fixed white/black colours need no per-theme or
 * per-`.light-mode` variant: for any background, at least one of pure
 * white or pure black clears 3:1 against it - verified against every
 * background this task touched (input/textarea/select/search-input/
 * creditcard-field's surface-100 and disabled-neutral-92 backgrounds, the
 * rich editor's white background, and the dropdown's transparent-over-
 * surface-100 background) in both `data-theme` values; see the task 9d
 * report for the computed ratios.
 *
 * Forced colors (5.3.5): every ring here used to pair the box-shadow with
 * `outline: none`. Windows forced-colors mode drops box-shadow, so these
 * fields showed no focus at all there. Each now carries a 2px transparent
 * outline instead: invisible normally, painted in a system colour when
 * colours are forced. On a white page the white ring is 1.00:1 and the dark
 * ring (#595959) 7.00:1; on #191C1C the white ring is 17.15:1 and the dark
 * ring 1.16:1 - one of the two always clears 3:1, as before.
 */
.dda-validation-error .dda-input-field:focus-visible,
.dda-input-disabled .dda-input-field:focus-visible,
/* The phone and number fields put their input inside a bordered group. In the error and disabled
   states the group drops its focus shadow, so the input itself takes the ring (WCAG 2.4.7). */
.dda-validation-error .dda-field-group-input:focus-visible,
.dda-input-disabled .dda-field-group-input:focus-visible,
.dda-phone-field-group.error .dda-field-group-input:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.65);
}

/* ...and the group around that input drops its teal ring, so the field shows one ring, not two. */
.dda-validation-error.dda-input-focus .dda-input-field-group,
.dda-input-disabled.dda-input-focus .dda-input-field-group {
    outline: none;
}

.dda-dropdown-container.bg-transparent .dda-dropdown-header:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.65);
}

.dda-richeditor-field .ql-editor:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.65);
}

/* The option list scrolls, which clips anything drawn outside an option, so this outline sits inside. */
.dda-input-dropdown-item:focus-visible {
    outline: 2px solid transparent;
    outline-offset: -2px;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.65);
}

