﻿/* =========================
   myNumericBox control
========================= */

/* Host custom element */
mynumericbox {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Mode readonly */
/* Mode readonly */
.myNumericBox {
    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: none;
    border-radius: 0;
    background: transparent;
    color: var(--zen-ctrl-color, #1f2937);
    font-family: var(--zen-ctrl-font-family);
    font-size: var(--zen-ctrl-font-size);
    line-height: normal;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
}

/* Wrapper édition */
.myNumericBox-wrap {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    height: var(--zen-ctrl-height);
    min-height: var(--zen-ctrl-height);
    background: transparent;
    font-family: var(--zen-ctrl-font-family);
    font-size: var(--zen-ctrl-font-size);
}

/* Input édition */
/* Input édition */
.myNumericBox-input {
    box-sizing: border-box;
    flex: 1 1 auto;
    width: 100%;
    height: var(--zen-ctrl-height);
    min-height: var(--zen-ctrl-height);
    padding: 0 var(--zen-ctrl-padding-x);
    padding-right: 8px;
    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;
    text-align: right;
    outline: none;
}
/* Unité éventuelle */
.myNumericBox-wrap .grid-unit {
    box-sizing: border-box;
    height: var(--zen-ctrl-height);
    min-height: var(--zen-ctrl-height);
    display: inline-flex;
    align-items: center;
    padding-left: 4px;
    color: #4b5563;
    font-family: var(--zen-ctrl-font-family);
    font-size: var(--zen-ctrl-font-size);
    line-height: normal;
}

/* Placeholder / readonly */
.myNumericBox.is-placeholder {
    color: #9ca3af;
}

/* Disabled / readonly */
.myNumericBox.is-readonly,
.myNumericBox-input:disabled {
    color: var(--zen-ctrl-disabled-color);
    background: transparent;
    opacity: 1;
    border-bottom: none;
    width: max-content;
}

/* Focus */
.myNumericBox-input:focus {
    border-bottom-color: #0F6CB7;
}
