body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    font-family: Arial, sans-serif;
    background-color: #128c7e;
    color: white;
    margin: 0;
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    gap: 16px 24px;
    margin: 20px;
}

.numpad button {
    width: 80px;
    height: 80px;
    font-size: 32px;
    font-weight: 700;
    border-radius: 40px;
    border: 2px solid rgba(0, 0, 0, 0);
    background-color: #25d366;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.1s ease;
    font-size: 24px;
    gap: 4px;
}

#callButton {
    width: 182px;
    background-color: #fff;
}

@media (hover: none) {
    .numpad button:active {
        background-color: #fff !important;
    }
}

@media (hover: hover) {
    .numpad button:hover {
        background-color: #28a745;
    }
    
    .numpad button:active {
        background-color: #fff;
    }
}

.numpad button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#display {
    font-size: 52px;
    margin-bottom: 0px;
    padding: 20px;
    width: 250px;
    text-align: center;
    transition: opacity 0.2s ease;
    letter-spacing: 0.05em;
    height: 60px;
}

#display.empty {
    opacity: 0.3;
}

#contactName {
    font-size: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

#contactButton {
    margin-top: 0;
    background-color: #fff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

#contactButton img {
    width: 32px;
    height: 32px;
    margin: 0;
}

#contactButton:disabled {
    cursor: not-allowed;
    transform: none;
}

#contactButton:disabled img {
    opacity: 0.3;
}

#backspaceButton, #callButton {
    display: flex;
    align-items: center;
    justify-content: center;
}

#backspaceButton img, #callButton img {
    width: 32px;
    height: 32px;
    margin: 0;
}

#actionButtons {
    display: flex;
    width: 288px;
    gap: 26px;
    margin-top: 16px;
}

#callInfo {
    opacity: .5;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.invisible {
    opacity: 0;
    pointer-events: none;
}

.drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0);
    height: 100%;
    display: none;
    transition: background-color 0.3s ease;
}

.drawer.active {
    display: block;
    background-color: rgba(0, 0, 0, 0.5);
}

.drawer-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f0f0f0;
    border-radius: 12px 12px 0 0;
    padding: 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.drawer.active .drawer-content {
    transform: translateY(0);
}

.drawer-header {
    text-align: center;
    margin-bottom: 16px;
    color: #000;
}

#drawerContactName {
    font-size: 18px;
    font-weight: bold;
}

#drawerAptNumber {
    font-size: 14px;
    color: #666;
}

.drawer-option {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: none;
    border-radius: 8px;
    background-color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.drawer-option img {
    width: 24px;
    height: 24px;
}

.drawer-option.cancel {
    background-color: transparent;
    color: #ff3b30;
    font-weight: bold;
}

#doormanMenuButton {
    display: none; /* Hidden by default */
    background-color: #25d366; /* Same green as other buttons */
}

#doormanMenuButton.active {
    background-color: white; /* White background when subject is selected */
}

#doormanMenuButton img {
    width: 32px;
    height: 32px;
    filter: brightness(0) saturate(100%) hue-rotate(185deg);
    margin: 0;
}

#doormanMenuButton.active img {
    filter: none; /* Remove filter when active to show original icon color */
}

#chatButton {
    margin-top: 0;
    background-color: #fff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chatButton img {
    width: 32px;
    height: 32px;
    margin: 0;
}

:is(#chatButton, #callButton):disabled {
    cursor: not-allowed;
    transform: none;
    color:rgba(0, 0, 0, 0.3);
}

:is(#chatButton, #callButton):disabled img {
    opacity: 0.3;
}

#backspaceButton {
    background-color: transparent;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#backspaceButton.visible {
    opacity: 1;
}

.contact-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 14px;
    margin-left: 8px;
    cursor: pointer;
}

.contact-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2000;
}

.contact-dropdown.active {
    display: block;
    opacity: 1;
}

.dropdown-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 12px;
    width: 80%;
    max-width: 300px;
    padding: 16px;
}

.dropdown-header {
    text-align: center;
    color: #000;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
}

#contactList {
    margin-bottom: 16px;
}

.contact-option {
    display: flex;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    border: none;
    border-radius: 8px;
    background-color: #f0f0f0;
    width: 100%;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
}

.contact-option span:last-child {
    flex: 1;
}

.contact-option.primary {
    font-weight: bold;
}

.dropdown-cancel {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: #ff3b30;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

.contact-info {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

/* Add styles for contact status badges */
.status-badge {
    display: inline-block;
    width: 24px;
    margin-right: 8px;
    font-size: 14px;
}