@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Source+Sans+3:wght@400;500;600&display=swap');

.wp-color-online-wrapper {
    /* Refined color palette with more premium gradations */
    --wpco-bg-canvas: #F8F8FA; /* Subtle off-white for canvas background */
    --wpco-bg-light: #FFFFFF;
    --wpco-bg-panel: #F5F7FA; /* Slightly bluer gray for panels */
    
    /* Richer border colors */
    --wpco-border-subtle: #E0E4E8; /* More blue-tinted border */
    --wpco-border-medium: #C8D0D9;
    
    /* Improved text colors with proper hierarchy */
    --wpco-text-primary: #1A2433; /* Darker, richer text */
    --wpco-text-secondary: #4A5568;
    --wpco-text-muted: #718096;
    
    /* Enhanced accent colors */
    --wpco-accent-blue: #3B82F6; /* Richer blue */
    --wpco-accent-blue-dark: #2563EB;
    --wpco-accent-blue-light: #EBF5FF;
    
    /* Add secondary accent for visual interest */
    --wpco-accent-purple: #8B5CF6;
    --wpco-accent-purple-light: #F5F3FF;
    
    /* Border Radius */
    --wpco-border-radius-sm: 4px;
    --wpco-border-radius-md: 6px;
    --wpco-border-radius-lg: 8px;
    
    /* Premium shadow layers */
    --wpco-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --wpco-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --wpco-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    
    /* Focus Ring */
    --wpco-focus-ring-width: 2px;
    --wpco-focus-ring-color: rgba(59, 130, 246, 0.6);
    --wpco-focus-ring-offset: 2px;
    
    /* Typography */
    --wpco-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --wpco-font-size-xs: 12px;
    --wpco-font-size-sm: 13px;
    --wpco-font-size-base: 15px;
    --wpco-font-size-lg: 18px;
    --wpco-font-weight-normal: 400;
    --wpco-font-weight-medium: 500;
    --wpco-font-weight-bold: 600;
    --wpco-line-height-base: 1.5;
    --wpco-line-height-tight: 1.25;
    
    /* Animation Timing */
    --wpco-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --wpco-transition-medium: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --wpco-transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
.wpco-modal, 
.wpco-modal * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--wpco-font-sans);
}

/* Ensure proper font inheritance throughout the app */
.wpco-modal button,
.wpco-modal input,
.wpco-modal select,
.wpco-modal textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* General start coloring button styling moved to main button section below */

/* Prevent scrolling on body when modal is open */
/* Removed body.coloring-modal-open - handled by ColoringHub */

/* Space held state for canvas panning */
/* Removed body.wpco-space-held - handled by ColoringHub */

/* Hide Color Online buttons on mobile devices */
@media (max-width: 767px) {
    .wp-color-online-button {
        display: none !important;
    }
}

/* Apply base font styles (e.g., to the modal container later) */
.wpco-modal {
   font-family: var(--wpco-font-sans); 
   color: var(--wpco-text-primary);
   font-size: var(--wpco-font-size-base);
   line-height: var(--wpco-line-height-base);
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
}

/* Layout structure fixes */
.wpco-main-layout {
  display: flex !important; 
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
}

.wpco-central-area {
  display: flex !important;
  flex-grow: 1 !important;
  overflow: hidden !important; /* Prevent content overflow */
}

.wpco-top-bar-placeholder,
.wpco-left-toolbar-placeholder {
  display: block !important; /* Ensure these are displayed */
}

/* WP Color Online Frontend Styles */

.wpco-image-wrapper {
    text-align: center; /* Center the inline-block children (image and button) */
    margin-bottom: 15px; /* Optional: space below the wrapper */
}

/* Base button styles - removed duplicate properties that override our new default */
.wp-color-online-button {
    margin-top: 12px;
    text-transform: none;
    letter-spacing: normal;
}

/* Default Style: Subtle Purple (new default) */
.wp-color-online-button,
.wpco-image-wrapper .wp-color-online-button,
button.wp-color-online-button {
    display: inline-block !important;
    padding: 10px 24px;
    background-color: #7B68EE;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0.2px;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(123, 104, 238, 0.15);
    margin-top: 12px !important;
    vertical-align: middle !important;
}

.wp-color-online-button:hover,
.wpco-image-wrapper .wp-color-online-button:hover,
button.wp-color-online-button:hover {
    background-color: #6B5EDE;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(123, 104, 238, 0.25), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: none;
}

.wp-color-online-button:focus {
    outline: none;
}

.wp-color-online-button:focus-visible {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

.wp-color-online-button:active {
    background-color: #5B4ECE;
    transform: none;
    box-shadow: 0 1px 2px rgba(123, 104, 238, 0.2);
}


/* No hover effects */
.wp-color-online-button.wpco-no-hover:hover {
    transform: none !important;
    box-shadow: inherit !important;
    background-color: inherit !important;
    color: inherit !important;
    border-color: inherit !important;
}

/* Main CSS for WP Color Online Plugin */

.wpco-backdrop {
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
}

/* Main Layout Structure */
.wpco-main-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background-color: var(--wpco-bg-light);
}

.wpco-central-area {
    display: flex;
    flex-grow: 1;
    overflow: hidden; /* Prevent content overflow */
}

.wpco-canvas-area {
    flex-grow: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--wpco-bg-canvas);
}

/* Ensure canvas container fills the available space */
.wpco-canvas-container {
    flex-grow: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--wpco-bg-canvas);
}

/* Loading indicator */
.wpco-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--wpco-text-secondary);
}

.wpco-loading::before {
    content: "";
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--wpco-accent-blue);
    animation: wpco-spin 1s ease-in-out infinite;
}

@keyframes wpco-spin {
    to { transform: rotate(360deg); }
}

/* Button base styles */
.wpco-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--wpco-border-radius-md);
    font-weight: var(--wpco-font-weight-medium);
    transition: all var(--wpco-transition-fast);
    cursor: pointer;
    padding: 8px 16px;
    outline: none;
}

.wpco-button:focus-visible {
    outline: var(--wpco-focus-ring-width) solid var(--wpco-focus-ring-color);
    outline-offset: var(--wpco-focus-ring-offset);
}

.wpco-button-primary {
    background-color: var(--wpco-accent-blue);
    color: white;
    border: none;
}

.wpco-button-primary:hover {
    background-color: var(--wpco-accent-blue-dark);
    box-shadow: var(--wpco-shadow-md);
}

.wpco-button-secondary {
    background-color: white;
    color: var(--wpco-text-primary);
    border: 1px solid var(--wpco-border-medium);
}

.wpco-button-secondary:hover {
    border-color: var(--wpco-accent-blue);
    color: var(--wpco-accent-blue);
    background-color: var(--wpco-accent-blue-light);
}

/* Component Placeholders - initially hidden */
.wpco-properties-bar-placeholder,
.wpco-color-panel-placeholder,
.wpco-main-menu-placeholder,
.wpco-feedback-modal-placeholder {
    display: none; /* Hidden by default */
}

.wpco-zoom-controls-placeholder {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 10;
}

.wpco-notifications-placeholder {
    position: absolute;
    top: 60px;
    right: 16px;
    z-index: 100;
}

/* Canvas focus outline - visible when canvas has focus */
.canvas-container:focus-within {
    outline: var(--wpco-focus-ring-width) solid var(--wpco-focus-ring-color);
    outline-offset: var(--wpco-focus-ring-offset);
}

/* Remove outline and box-shadow from canvas containers during space-drag */
/* Removed body.wpco-space-held selectors - handled within ColoringHub modal */

/* Responsive adjustments */
@media (max-width: 768px) {
    .wp-color-online-wrapper {
        --wpco-font-size-base: 14px;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
} 