* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
}

#loading, #error {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading p {
    color: #666;
    font-size: 16px;
}

#error {
    display: none;
}

#error p {
    color: #e74c3c;
    font-size: 16px;
    margin-bottom: 16px;
    text-align: center;
    padding: 0 24px;
}

#error button {
    padding: 12px 32px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

#error button:hover {
    background: #2980b9;
}

#error button:active {
    background: #2471a3;
}

/* Hide Crisp chat button since we always show maximized */
.crisp-client .cc-tlyw .cc-kxkl {
    display: none !important;
}

/* Ensure Crisp chat fills the screen */
.crisp-client .cc-1m2mf {
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
}

/* Remove shadow/overlay */
.crisp-client .cc-1m2mf .cc-1ads {
    box-shadow: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .spinner {
        width: 32px;
        height: 32px;
    }
    
    #loading p, #error p {
        font-size: 14px;
    }
    
    #error button {
        padding: 10px 24px;
        font-size: 14px;
    }
}
