﻿/* =========================
   myDropDown control
========================= */

/* Host custom element */
mydropdown {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Élément réel : select en édition, div en readonly */
.myDropDown,
.myDropdown {
    box-sizing: border-box;
    width: 100%;
    height: var(--zen-ctrl-height);
    min-height: var(--zen-ctrl-height);
    padding: 0 var(--zen-ctrl-padding-x);
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--zen-ctrl-border-color);
    border-radius: 0;
    background: transparent;
    color: #1f2937;
    font-family: var(--zen-ctrl-font-family);
    font-size: var(--zen-ctrl-font-size);
    line-height: normal;
    outline: none;
}

/* Mode édition : select */
select.myDropDown,
select.myDropdown {
    display: block;
    cursor: pointer;
    text-overflow: ellipsis;
}

/* Mode readonly : div */
div.myDropDown,
div.myDropdown,
.myDropDown.is-readonly,
.myDropdown.is-readonly {
    display: flex;
    align-items: center;
    cursor: default;
    border-bottom: none;
}

/* Placeholder readonly */
.myDropDown.is-placeholder,
.myDropdown.is-placeholder {
    color: #9ca3af;
}

/* Disabled / readonly */
select.myDropDown:disabled,
select.myDropdown:disabled,
.myDropDown.is-readonly,
.myDropdown.is-readonly {
    color: var(--zen-ctrl-disabled-color);
    background: transparent;
    opacity: 1;
    border-bottom: none;
}

/* Focus */
select.myDropDown:focus,
select.myDropdown:focus {
    border-bottom-color: #0F6CB7;
}
