/* Interactive Components */
.quarkcode-modes {
    display: none !important;
    justify-content: center;
    margin-bottom: 25px;
    gap: 10px;
}

.mode-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.action-controls {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    width: 100%;
}

/* Cross-browser gap support */
.action-controls > * {
    margin-right: 10px;
}

.action-controls > *:last-child {
    margin-right: 0;
}

/* Modern browsers with gap support */
@supports (gap: 10px) {
    .action-controls {
        gap: 10px;
    }
    
    .action-controls > * {
        margin-right: 0;
    }
}

.aspect-ratio-select {
    padding: 0 18px 0 0;
    border: none;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: transparent;
    cursor: pointer;
    transition: color 0.3s ease;
    min-width: auto;
    box-shadow: none;
}

.aspect-ratio-select:hover {
    color: #333;
}

.aspect-ratio-select:focus {
    outline: none !important;
    color: #333;
}

.generate-button {
    -webkit-flex: 1 1 0;
    -ms-flex: 1 1 0px;
    flex: 1 1 0;
    min-width: 150px;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--quarkcode-primary, #667eea) 0%, var(--quarkcode-secondary, #764ba2) 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.generate-button.create-new-inline {
    /* Equal sizing with generateBtn */
}

.generate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.generate-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

/* Minimal Circular Spinner */
.bucket-spinner {
    width: 50px;
    height: 50px;
    display: inline-block;
    position: relative;
    margin: 20px auto;
}

.bucket {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(135, 206, 235, 0.2);
    border-top-color: #87ceeb;
    border-radius: 50%;
    animation: spinFast 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

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

/* Usage Stats */
.usage-stats {
    margin-top: 15px;
}

.usage-info {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    color: black !important;
    backdrop-filter: blur(10px);
}

.usage-info.success {
    background: rgba(46, 204, 113, 0.3);
}

.usage-info.warning {
    background: rgba(241, 196, 15, 0.3);
}

.usage-info.danger {
    background: rgba(231, 76, 60, 0.3);
}

/* Image Buttons */
.image-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Legacy button styles - kept for compatibility */
.download-btn {
    padding: 10px 20px;
    background: var(--quarkcode-button, #28a745);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.download-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

/* Debug Box */
.quarkcode-debug-box {
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    margin: 15px 0;
    font-size: 13px;
    color: #333;
}

.quarkcode-debug-box strong {
    color: #2c3e50;
    font-weight: 600;
}

.quarkcode-debug-box #imageSourceText {
    color: #34495e;
    font-style: italic;
}

.quarkcode-debug-box #imageSourceUrl {
    color: #666;
    font-size: 11px;
}

.quarkcode-debug-box #finalPromptText {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #2c3e50;
    max-height: 300px;
    overflow-y: auto;
}

/* Save button for Style and Secret Sauce */
.quarkcode-save-btn {
    padding: 6px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quarkcode-save-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.quarkcode-save-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* Storage paragraph styling 
 * These paragraphs are HIDDEN on the frontend but VISIBLE in WordPress backend editor
 * This allows direct editing in the page editor while keeping them hidden from visitors
 */

/* Hide storage paragraphs on frontend only (not in admin/editor) */
body:not(.wp-admin) .quarkcode-style-storage,
body:not(.wp-admin) .quarkcode-secret-sauce-storage,
body:not(.wp-admin) .quarkcode-camera-storage {
    display: none !important;
}

/* Styling for backend editor view */
.quarkcode-style-storage,
.quarkcode-secret-sauce-storage,
.quarkcode-camera-storage {
    margin-top: 15px;
    padding: 12px;
    background: #f0f4ff;
    border-left: 4px solid #667eea;
    border-radius: 4px;
    font-size: 14px;
    color: #2c3e50;
    white-space: pre-wrap;
    line-height: 1.6;
}
