/* Customize button */
.wc-canva-open {
    margin-top: 10px;
    background: #00c4cc;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wc-canva-open:hover {
    background: #00a8b0;
    color: white;
}

/* Modal overlay */
#wc-canva-modal {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal content */
#wc-canva-modal .wc-canva-modal-inner {
    background: #fff;
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    max-height: 800px;
    border-radius: 12px;
    position: relative;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* Close button */
#wc-canva-modal .wc-canva-close {
    position: absolute;
    right: 15px;
    top: 15px;
    background: #f0f0f0;
    border: none;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    line-height: 1;
    color: #333;
}

#wc-canva-modal .wc-canva-close:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

/* Editor container */
#wc-canva-editor-root {
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
}

/* Loading state */
.wc-canva-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px 50px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 16px;
    color: #333;
    display: none;
    z-index: 5;
}

.wc-canva-loading::after {
    content: '';
    display: inline-block;
    margin-left: 10px;
    width: 20px;
    height: 20px;
    border: 3px solid #00c4cc;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    #wc-canva-modal .wc-canva-modal-inner {
        width: 100%;
        height: 100vh;
        max-height: none;
        border-radius: 0;
        padding: 15px;
    }

    #wc-canva-modal .wc-canva-close {
        right: 10px;
        top: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }

    .wc-canva-loading {
        padding: 20px 30px;
        font-size: 14px;
    }
}