.ecomdrive-error-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px;
    box-sizing: border-box;
}

.ecomdrive-error-content {
    background: white;
    padding: 40px 32px;
    border-radius: 24px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.ecomdrive-error-icon-wrapper {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.ecomdrive-error-icon-svg {
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ecomdrive-error-title {
    color: #111827;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.ecomdrive-error-message {
    color: #6B7280;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.ecomdrive-contact-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1.5px solid #93c5fd;
}

.ecomdrive-contact-info h4 {
    color: #1d4ed8;
    font-size: 15px;
    margin: 0 0 14px 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ecomdrive-contact-info h4::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%231d4ed8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8.625 9.75a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 01.778-.332 48.294 48.294 0 005.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.ecomdrive-contact-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ecomdrive-contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: white;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    color: #1f2937;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ecomdrive-contact-item:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    background: #f8fafc;
}

.ecomdrive-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #EFF6FF;
    color: #3B82F6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ecomdrive-contact-item:nth-child(2) .ecomdrive-icon-box {
    background: #ECFDF5;
    color: #10B981;
}

.ecomdrive-contact-item:nth-child(3) .ecomdrive-icon-box {
    background: #F5F3FF;
    color: #8B5CF6;
}

.ecomdrive-error-button {
    background: #111827;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ecomdrive-error-button:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.ecomdrive-error-button:active {
    transform: translateY(0);
}

@keyframes slideUp {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }

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

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

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

@media (max-width: 480px) {
    .ecomdrive-error-modal {
        padding: 16px;
        align-items: flex-end;
        /* Bottom sheet style on mobile */
    }

    .ecomdrive-error-content {
        padding: 24px 20px;
        border-radius: 20px 20px 0 0;
        /* Rounded top corners only */
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        /* Prevent taking up full screen */
        overflow-y: auto;
        /* Scrollable if content is long */
        margin: 0;
        animation: slideUpMobile 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .ecomdrive-error-title {
        font-size: 18px;
    }

    .ecomdrive-error-message {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .ecomdrive-contact-item {
        padding: 12px;
        font-size: 14px;
        /* Keep readable size */
    }

    .ecomdrive-error-button {
        padding: 16px;
        /* Larger touch target */
        font-size: 16px;
        margin-bottom: env(safe-area-inset-bottom);
        /* Handle iPhone home bar */
    }
}

@keyframes slideUpMobile {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}