/* flash.css — cookie-д суурилсан flash message style
 * ---------------------------------------------------
 */

#flash-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: 420px;
}

.flash-box {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .85rem 1.1rem;
    padding-right: 2.4rem;  /* зай × товчинд */
    border-radius: 7px;
    color: white;
    font-size: .92rem;
    line-height: 1.4;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    min-width: 240px;
    max-width: 420px;
    word-break: break-word;
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: transform .28s cubic-bezier(.2,.7,.3,1.2), opacity .28s;
}

.flash-box.flash-in  { transform: translateX(0); opacity: 1; }
.flash-box.flash-out { transform: translateX(120%); opacity: 0; transition: transform .4s, opacity .4s; }

.flash-success { background: #16a34a; }
.flash-warning { background: #d97706; }
.flash-error   { background: #dc2626; }

.flash-text {
    flex: 1;
    white-space: pre-wrap;
}

.flash-close {
    position: absolute;
    top: .35rem;
    right: .45rem;
    width: 26px;
    height: 26px;
    background: transparent;
    color: rgba(255, 255, 255, .85);
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    border-radius: 4px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s;
}
.flash-close:hover {
    background: rgba(255, 255, 255, .2);
    color: white;
}

/* Дуусах хугацаа харуулах progress bar — доод талд */
.flash-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, .45);
    transition-property: width;
    transition-timing-function: linear;
}
