.ajax-form-msg,
#q-form-messages,
#review-form-messages {
    display: none;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field__error {
    display: none;
    margin-top: 8px;
    color: var(--primary-color);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.form-field__error:empty {
    display: none !important;
}

.form-field.is-invalid .form-control,
.form-field.is-invalid .nice-select,
.form-field.is-invalid .rating-picker__container {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(223, 17, 25, 0.12);
}

.form-field.is-invalid .nice-select:after {
    border-color: var(--primary-color);
}

.form-field.is-invalid .rating-picker__value {
    color: var(--primary-color);
}

.form-field.is-invalid .rating-picker__container {
    border-radius: 16px;
}

#toast-container {
    position: fixed;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

#toast-container.toast-top-right {
    top: 24px;
    right: 24px;
}

#toast-container.toast-top-left {
    top: 24px;
    left: 24px;
}

#toast-container.toast-bottom-right {
    right: 24px;
    bottom: 24px;
}

#toast-container.toast-bottom-left {
    left: 24px;
    bottom: 24px;
}

.toast {
    position: relative;
    width: min(380px, calc(100vw - 32px));
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-12px);
    animation: toast-enter 180ms ease forwards;
}

.toast.toast-closing {
    animation: toast-exit 180ms ease forwards;
}

.toast__body {
    position: relative;
    padding: 16px 48px 16px 18px;
}

.toast__title {
    margin-bottom: 4px;
    color: var(--heading-color);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.toast__message {
    color: var(--heading-color);
    font-size: 15px;
    line-height: 1.5;
}

.toast__close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    background: transparent;
    color: rgba(0, 0, 0, 0.45);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.toast__close:hover {
    color: var(--heading-color);
}

.toast__progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.toast__progress span {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    animation-name: toast-progress;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

.toast-success {
    border-left: 4px solid #1f8f55;
}

.toast-success .toast__progress span {
    background: #1f8f55;
}

.toast-error {
    border-left: 4px solid var(--primary-color);
}

.toast-error .toast__progress span {
    background: var(--primary-color);
}

.toast-warning {
    border-left: 4px solid #d38b14;
}

.toast-warning .toast__progress span {
    background: #d38b14;
}

.toast-info {
    border-left: 4px solid #176fb8;
}

.toast-info .toast__progress span {
    background: #176fb8;
}

@keyframes toast-enter {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toast-exit {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@media (max-width: 767px) {
    #toast-container.toast-top-right,
    #toast-container.toast-top-left {
        top: 16px;
        right: 16px;
        left: 16px;
    }

    #toast-container.toast-bottom-right,
    #toast-container.toast-bottom-left {
        right: 16px;
        bottom: 16px;
        left: 16px;
    }

    .toast {
        width: 100%;
    }
}
