/* =============================================
   MAX Messenger Widget
   ============================================= */

.max-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.max-widget__item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.max-widget__tooltip {
    background: #1a1a2e;
    color: #fff;
    font-size: 13px;
    font-family: sans-serif;
    padding: 7px 14px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity .25s, transform .25s;
    pointer-events: none;
}

.max-widget__item:hover .max-widget__tooltip {
    opacity: 1;
    transform: translateX(0);
}

.max-widget__btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7b2fe0, #a855f7);
    box-shadow: 0 4px 16px rgba(123, 47, 224, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

.max-widget__btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(123, 47, 224, .65);
}

.callback-widget-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 4px 16px rgba(22, 163, 74, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.callback-widget-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(22, 163, 74, .65);
}


/* =============================================
   Callback Modal
   ============================================= */

.cb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.cb-overlay.active {
    display: flex;
}

.cb-modal {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px 32px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .22);
    font-family: sans-serif;
}

.cb-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.cb-modal__close:hover {
    color: #333;
}

.cb-modal h3 {
    margin: 0 0 6px;
    font-size: 20px;
    color: #1a1a2e;
}

.cb-modal p {
    margin: 0 0 20px;
    font-size: 13px;
    color: #666;
}

.cb-modal input[type="text"],
.cb-modal input[type="tel"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color .2s;
}

.cb-modal input:focus {
    border-color: #22c55e;
}

.cb-modal__consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.cb-modal__consent input {
    margin-top: 2px;
    flex-shrink: 0;
}

.cb-modal__consent a {
    color: #22c55e;
}

.cb-modal__submit {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}

.cb-modal__submit:hover {
    opacity: .88;
}

.cb-modal__msg {
    display: none;
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.cb-modal__msg.success {
    background: #dcfce7;
    color: #16a34a;
    display: block;
}

.cb-modal__msg.error {
    background: #fee2e2;
    color: #dc2626;
    display: block;
}
