﻿/* =========================
   myTextBox control
========================= */

/* Host custom element */
mytextbox {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Élément réel : input en édition, div en readonly */
.myTextBox {
    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;
}

/* Spécifique input */
input.myTextBox {
    display: block;
}

/* Spécifique readonly div */
div.myTextBox,
.myTextBox.is-readonly {
    display: flex;
    align-items: center;
    cursor: default;
    border-bottom : none;
}

/* Placeholder HTML input */
input.myTextBox::placeholder {
    color: #9ca3af;
}

/* Placeholder custom readonly */
.myTextBox.is-placeholder {
    color: #9ca3af;
}

/* Disabled / readonly */
input.myTextBox:disabled,
.myTextBox.is-readonly {
    color: var(--zen-ctrl-disabled-color);
    background: transparent;
    opacity: 1;
}

/* Focus */
input.myTextBox:focus {
    border-bottom-color: #0F6CB7;
}
