/**
 * Public CSS for the img.ly Creative Editor plugin
 */
.imgly-editor-container {
    background-color: #F7F9FC;
    border-radius: 12px;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
    padding: 20px;
    transition: box-shadow 0.3s ease;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.imgly-editor-container:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.imgly-editor-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.imgly-editor-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #262626;
}

.imgly-editor-status {
    font-size: 14px;
    color: #718096;
}

.imgly-editor-wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.imgly-editor-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.imgly-editor-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(57, 99, 255, 0.2);
    border-radius: 50%;
    border-top-color: #3963FF;
    animation: imgly-spin 1s linear infinite;
}

.imgly-editor-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    gap: 10px;
}

.imgly-editor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: #3963FF;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.imgly-editor-button.secondary {
    background-color: #EDF2F7;
    color: #4A5568;
}

.imgly-editor-button:hover {
    background-color: #2347DD;
    transform: translateY(-1px);
}

.imgly-editor-button.secondary:hover {
    background-color: #E2E8F0;
}

.imgly-editor-button:active {
    transform: translateY(0);
}

.imgly-editor-button svg {
    margin-right: 6px;
    width: 16px;
    height: 16px;
}

.imgly-editor-save-status {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: #718096;
    margin-right: auto;
}

.imgly-editor-save-status.saved {
    color: #48BB78;
}

.imgly-editor-save-status.saving {
    color: #3963FF;
}

.imgly-editor-save-status svg {
    margin-right: 5px;
    width: 14px;
    height: 14px;
}

/* Custom styling for Creative Editor UI elements */
.cesdk-container {
    border-radius: 8px !important;
    overflow: hidden;
}

/* Responsive styles */
@media (max-width: 768px) {
    .imgly-editor-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .imgly-editor-status {
        margin-top: 8px;
    }
    
    .imgly-editor-actions {
        flex-wrap: wrap;
    }
    
    .imgly-editor-button {
        flex: 1 0 calc(50% - 5px);
    }
}

@keyframes imgly-spin {
    to { transform: rotate(360deg); }
}

/* Add theme customization for CE.SDK UI */
.ly-cesdk-dark-theme {
    --cesdk-color-primary: #3963FF;
    --cesdk-color-on-primary: #FFFFFF;
    --cesdk-color-primary-variant: #2347DD;
    --cesdk-color-on-primary-variant: #FFFFFF;
    --cesdk-color-secondary: #06D6A0;
    --cesdk-color-on-secondary: #FFFFFF;
}

/* Support for iPhone and Safari */
@supports (-webkit-touch-callout: none) {
    .imgly-editor-wrapper {
        -webkit-overflow-scrolling: touch;
    }
}