/* ==============================
   CUSTOM MODAL
============================== */

.custom-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

.custom-modal.active {
    display: flex;
}

.custom-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.custom-modal-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    overflow-y: auto;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.20);
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================
   MODAL BODY
============================== */

.custom-modal-body {
    padding: 24px;
    background: #fff;
    text-align: center;
}

.call-status {
    font-size: 13px;
    color: #777;
    margin-bottom: 15px;
}

/* Phone number input */

#phoneNumber {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 13px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    background: #f8faff;
    color: #1A1F6F;
    font-size: 20px;
    text-align: center;
    outline: none;
    margin-bottom: 22px;
}

#phoneNumber:focus {
    border-color: #2C52CC;
    box-shadow: 0 0 0 2px rgba(44, 82, 204, 0.10);
}

/* ==============================
   CIRCULAR KEYPAD
============================== */

.custom-keypad {
    display: grid;
    grid-template-columns: repeat(3, 62px);
    justify-content: center;
    gap: 12px;
    max-width: 260px;
    margin: 0 auto 24px;
}

.custom-keypad button {
    width: 62px;
    height: 62px;
    margin: auto;
    border: none;
    border-radius: 50%;
    background: #f2f5fa;
    color: #26345c;
    font-size: 21px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    touch-action: manipulation;
}

.custom-keypad button:hover {
    background: #e2eaff;
    color: #2C52CC;
}

.custom-keypad button:active {
    transform: scale(0.92);
    background: #d5e1ff;
}

/* ==============================
   CALL ACTIONS
============================== */

.call-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
}

.call-actions button {
    min-width: 110px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, opacity 0.2s;
    touch-action: manipulation;
}

.call-actions button:active {
    transform: scale(0.95);
}

#callNow {
    background: #2C52CC;
    color: #fff;
}

#callNow:hover {
    background: #1A1F6F;
}

#id_end_call {
    background: #dc3545;
    color: #fff;
    border: none;
    min-width: 110px;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}


#id_end_call:hover {
    background: #b02a37;
}

/* #endCall:hover:not(:disabled) {
    background: #f8dada;
}

.call-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
} */

/* ==============================
   RESPONSIVE - SMALL SCREENS
============================== */

@media (max-width: 400px) {

    .custom-modal-container {
        max-width: 320px;
    }

    .custom-modal-body {
        padding: 16px;
    }

    .custom-keypad {
        grid-template-columns: repeat(3, 58px);
        gap: 10px;
    }

    .custom-keypad button {
        width: 58px;
        height: 58px;
        font-size: 20px;
    }

    .call-actions button {
        min-width: 100px;
        padding: 11px 16px;
    }
}

/* ==============================
   RESPONSIVE - SHORT SCREENS
============================== */

@media (max-height: 600px) {

    .custom-modal-container {
        max-height: 95vh;
    }

    .custom-modal-body {
        padding: 12px;
    }

    .custom-keypad {
        gap: 7px 12px;
        margin-bottom: 15px;
    }

    .custom-keypad button {
        width: 50px;
        height: 50px;
    }

    .call-actions {
        margin-top: 12px;
    }
}
