/* ===== Basic Popups styles ===== */

/* ===== Modal Popup ===== */
.modal {
    /* width: min(420px, calc(100vw - 24px)); */
    width: min(100% - 2 * var(--space-3), 520px);
    max-width: 100%;
    max-height: 92dvh;
    margin: auto;
    padding: 0;
    overflow-y: auto;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-raised);
}
.modal::backdrop {
    background: rgba(16, 24, 33, .75);
}
.modal .modal__inner {
    /* position: relative; */
    display: grid;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-4) var(--space-5);
    background-color: #ededed;
}
.modal .modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
}
.modal h2 {
    font-size: var(--fs-xl);
    margin: 0;
}
.modal .modal__close {
    flex: none;
    width: var(--tap);
    height: var(--tap);
    margin: -8px -8px 0 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    outline: 0;
    color: var(--muted);
    margin-left: auto;
}
.modal .modal__close:hover {
    background: var(--surface-2);
    color: var(--ink);
}
.modal .modal__close .icon {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.modal .modal__intro {
    margin: 0;
    color: var(--muted);
    font-size: var(--fs-md);
    white-space: pre-line;
    line-height: var(--fs-xl);
}
/* ===== End - Modal Popup ===== */



/* ===== Form ===== */
.modal .form {
    display: grid;
    gap: var(--space-4);
}
.modal .form[hidden] {
    display: none;
}
.modal .field {
    display: grid;
    gap: 6px;
    margin-top: var(--space-4);
}
.modal .field__label {
    font-weight: 600;
}
.modal .field__label .field__optional {
    font-weight: 400;
    color: var(--muted);
}
/* ===== End - Form ===== */



/* ===== Input, Textarea and Select fields ===== */
.modal .input, .modal .textarea, .modal .select {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-size: var(--fs-md);
}
.modal .input::placeholder, .modal .textarea::placeholder {
    color: #66717f;
}
.modal .textarea {
    min-height: 115px;
    resize: vertical;
    line-height: var(--fs-xl);
}
.modal .input:hover, .modal .textarea:hover {
    border-color:
    var(--muted);
}
.modal .input:focus, .modal .textarea:focus {
    outline: 3px solid var(--focus);
    outline-offset: 1px;
    border-color: var(--brand);
}
.modal .input[aria-invalid="true"], .modal .textarea[aria-invalid="true"] {
    border-color: var(--danger);
    background: #fffafa;
}
.modal .field__error {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    color: var(--danger);
    font-weight: 500;
}
.modal .field__error[hidden] {
    display: none;
}
.modal .field__error:empty {
    display: none;
}
.modal .field__error .field__error-icon {
    width: 25px;
    height: 25px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* ===== End - Input and Textarea fields ===== */
/* ===== Phone field with prefix +38 ===== */
.modal .phone-field {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
}
.modal .phone-field[data-invalid="true"] {
    border-color: var(--danger, #b3261e);
}
.modal .phone-field:focus-within {

}
.modal .phone-field__prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-right: 1px solid var(--line);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background: var(--surface-2);
    color: var(--ink);
    font-weight: 400;
    user-select: none;
    font-size: var(--fs-lg);
}
.modal .phone-field__prefix-plus {
    margin: -2px 2px 0 0;
}
.modal .phone-field .phone_number {
    border: 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    outline: 0;
    width: 100%;
    min-height: 48px;
    padding: var(--space-1) var(--space-3);
    font-size: var(--fs-xl);
    background: var(--surface);
}
.modal .phone-field .phone_number::placeholder {
    color: #aaa;
}
.modal .phone-field .phone_number:hover {
    border-color: var(--muted);
}
.modal .phone-field .phone_number[aria-invalid="true"] {
    border-color: var(--danger);
    background: #fffafa;
}
/* ===== End - Phone field with prefix +38 ===== */





/* ===== Messages above buttons (error/success) ===== */
.modal .notice {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--brand-tint);
    color: var(--ink);
    font-size: var(--fs-sm);
    margin-top: 15px;
}
.modal .notice .notice--icon {
    margin-top: 1px;
    color: var(--danger);
}
/* .modal .notice .notice--icon {
    width: 25px;
    height: 25px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
} */
.modal .notice span {
    margin-top: var(--space-1);
    color: var(--danger);
}
.modal .notice--ok {
    background: var(--ok-tint);
}
.modal .notice--ok .icon {
    color: var(--ok);
}
.modal .notice--error {
    background: var(--danger-tint);
}
.modal .notice.notice--error .notice--icon {
    color: var(--danger);
}
.modal .notice--warn {
    background: var(--warn-tint);
    color: var(--warn-ink);
}
.modal .notice--warn .icon {
    color: var(--warn-ink);
}
.modal .notice[hidden] {
    display: none;
}
/* ===== End - Messages above buttons (error/success) ===== */



/* ===== Buttons ===== */
/* .modal .button-container, .form .button-container {
    display: grid;
    gap: var(--space-2);
    margin-top: 25px;
}
@media (min-width: 420px) {
  .modal .button-container { grid-template-columns: 1fr auto; }
}
.modal .modal__btn, .form .modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 50px;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  width: 100%;
  transition: background-color .15s, border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.modal .modal__btn:active {
    transform: translateY(1px);
}
.modal .modal__btn[disabled], .modal .modal__btn[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}
.modal .btn--primary, .form .btn--primary {
    background: var(--brand); color: #fff;
}
.modal .btn--primary:hover {
    background: var(--brand-hover);
    color: #fff;
}
.form .btn--orange {
    background: #ea4e00; color: #fff;
}
.form .btn--orange:hover {
    background: #d04804;
    color: #fff;
}
.modal .btn--secondary {
    font-weight: 300;
    border-color: var(--line-strong);
}
.modal .btn--secondary:hover {
    border-color: var(--brand);
    background: var(--brand-tint);
    color: var(--brand-hover);
}
/* .btn--block { width: 100%; } */

/* ===== End - Buttons ===== */



/* ===== Thank you screen - after sending ===== */
.modal .thanks {
    display: grid;
    justify-items: center;
    gap: var(--space-2);
    padding: var(--space-5) var(--space-3);
    text-align: center;
}
.modal .thanks[hidden] {
    display: none;
}
.modal .thanks__img {
    display: block;
    width: 300px;
    height: 200px;
    max-width: 100%;
}
.modal .thanks__title {
    margin: var(--space-6) 0 0;
    font-size: var(--fs-2xl, 22px);
    font-weight: 700;
}
.modal .thanks__text {
    margin-top: var(--space-3);
    color: var(--muted);
    font-size: var(--fs-lg);
}
/* ===== End - Thank you screen - after sending ===== */


@media (min-width: 450px) {
    .modal {
        width: min(100% - 2 * var(--space-4), 520px);
        margin: auto;
        border-radius: var(--radius-lg);
    }
    .modal .modal__inner {
        padding: var(--space-6);
    }
}

/* ===== End - Basic Popups styles ===== */