
#kp-phone-root {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #263238;
    line-height: 1.5;
}

#kp-phone-root [hidden],
#kp-phone-root[hidden] {
    display: none !important;
}

#kp-phone-root * {
    box-sizing: border-box;
}

#kp-phone-root button {
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}

#kp-phone-root button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Кнопка відкриття */

#kp-phone-launcher {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 10550;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 20px;
    background: #198754;
    color: #fff;
    border: 0;
    border-radius: 28px;
    box-shadow: 0 4px 18px rgba(0,0,0,.2);
    font-weight: 600;
}

.kp-phone-launcher-icon {
    font-size: 20px;
}

.kp-phone-indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #adb5bd;
}

.kp-phone-indicator.online {
    background: #80ff9d;
}

.kp-phone-indicator.offline {
    background: #ff6868;
}

/* Загальний вигляд вікон */

.kp-phone-card {
    position: fixed;
    width: 340px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    overflow: hidden;
    z-index: 10560;
}

#kp-phone-panel {
    right: 20px;
    bottom: 24px;
}

#kp-call-popup {
    right: 20px;
    top: 24px;
    z-index: 10570;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.kp-phone-header {
    background: #263238;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kp-phone-header button {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 22px !important;
    padding: 0 8px;
}

.kp-phone-content {
    padding: 16px;
}

.kp-phone-connection {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 12px;
}

/* Поля номеронабирача */

#kp-phone-root input,
#kp-phone-root select {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 10px;
    background: #fff;
    color: #263238;
}

#kp-phone-store {
    margin-bottom: 12px;
}

.kp-phone-number-row {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

#kp-phone-number {
    min-width: 0;
    font-size: 19px;
    text-align: center;
}

#kp-phone-backspace {
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0 12px;
}

.kp-phone-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-bottom: 14px;
}

.kp-phone-key {
    height: 46px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 21px !important;
}

.kp-phone-key:hover {
    background: #e9ecef;
}

/* Кнопки */

.kp-phone-btn-success,
.kp-phone-btn-danger,
.kp-phone-btn-primary {
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    font-weight: 600;
}

.kp-phone-btn-success {
    background: #198754;
}

.kp-phone-btn-danger {
    background: #dc3545;
}

.kp-phone-btn-primary {
    background: #0d6efd;
}

.kp-call-actions {
    display: flex;
    gap: 8px;
    margin: 15px 0;
}

/* Popup дзвінка */

.kp-call-store {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.kp-call-store.kp {
    color: #198754;
}

.kp-call-store.bs {
    color: #a87900;
}

.kp-call-number {
    font-size: 25px;
    font-weight: 700;
    text-align: center;
    overflow-wrap: anywhere;
}

.kp-call-client {
    text-align: center;
    font-size: 16px;
    margin-top: 5px;
}

.kp-call-timer {
    text-align: center;
    color: #6c757d;
    margin: 8px 0;
    font-variant-numeric: tabular-nums;
}

.kp-call-divider {
    border-top: 1px solid #e9ecef;
    margin: 16px 0;
}

#kp-call-history {
    font-size: 13px;
    margin: 10px 0 16px;
    max-height: 220px;
    overflow-y: auto;
}

#kp-phone-message,
#kp-call-message {
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
}

@media (max-width: 480px) {

    #kp-phone-panel,
    #kp-phone-launcher {
        right: 12px;
        bottom: 12px;
    }

    #kp-call-popup {
        right: 12px;
        top: 12px;
    }

}
