.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    z-index: 999;
}

.contacts-delete-confirm {
    width: min(420px, calc(100% - 24px));
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    box-sizing: border-box;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    margin-top: auto;
    margin-bottom: auto;
}

.contacts-delete-confirm h3 {
    margin: 0 0 8px;
    font-size: 28px;
    color: #2a3647;
}

.contacts-delete-confirm p {
    margin: 0;
    font-size: 16px;
    color: #2a3647;
}

.contacts-delete-confirm-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.overlay-panel {
    width: min(1120px, 100%);
    min-height: 520px;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    display: grid;
    grid-template-columns: 420px 1fr;
    position: relative;
    animation: contacts-overlay-slide-in 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.overlay-left {
    background: #2a3647;
    color: #ffffff;
    padding: 56px 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.overlay-logo {
    width: 54px;
    height: 66px;
    object-fit: contain;
}

.overlay-left-title {
    margin: 0;
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.overlay-left-subtitle {
    margin: 0;
    font-size: 18px;
    opacity: 0.9;
}

.overlay-left-line {
    width: 92px;
    height: 3px;
    background: #29abe2;
    border-radius: 2px;
    margin-top: 8px;
}

.overlay-close-button {
    position: absolute;
    right: 20px;
    top: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
    color: #2a3647;
    border-radius: 10px;
}

.overlay-close-button:hover {
    background: #f6f7f8;
}

.overlay-right {
    display: flex;
    align-items: center;
    padding: 46px 56px;
}

.overlay-content {
    width: 100%;
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 36px;
    align-items: start;
}

.overlay-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 40px;
    background: #d1d1d1;
    margin-top: 18px;
}

.overlay-avatar-icon {
    width: 120px;
    height: 120px;
}

.overlay-form {
    width: 100%;
    max-width: 520px;
}

.field {
    margin-bottom: 14px;
}

.field-wrapper {
    position: relative;
}

.field input {
    width: 100%;
    height: 48px;
    border: 1px solid #d1d1d1;
    border-radius: 10px;
    padding: 12px 46px 12px 16px;
    outline: none;
    box-sizing: border-box;
    background: #ffffff;
}

.field input:focus {
    border-color: #29abe2;
}

.field-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0.55;
    pointer-events: none;
}

.field-error-message {
    min-height: 18px;
    font-size: 12px;
    color: #d61c1c;
    margin-top: 6px;
}

.overlay-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.overlay-actions .button-primary,
.overlay-actions .button-ghost {
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.overlay-actions .button-primary:hover {
    background: #29abe2;
    border-color: #29abe2;
    color: #ffffff;
    filter: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(41, 171, 226, 0.28);
}

.overlay-actions .button-ghost:hover {
    background: #ffffff;
    border-color: #29abe2;
    color: #29abe2;
    filter: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(41, 171, 226, 0.24);
}

.form-note {
    min-height: 18px;
    font-size: 12px;
    color: #2a3647;
    opacity: 0.8;
    margin-top: 10px;
}

.success-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #2a3647;
    color: #ffffff;
    padding: 20px 40px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slide-up 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.success-toast-text {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes contacts-overlay-slide-in {
    from {
        opacity: 0;
        transform: translateX(28px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}