/* Admin/Staff Design Tool Styles */

/* Hide Yoast SEO Frontend Inspector when design tool is active */
body:has(#wcdt-admin-tool) div[style*="z-index: 99998"] {
    display: none !important;
}

/* Force full viewport height on pages with admin tool */
html:has(#wcdt-admin-tool),
body:has(#wcdt-admin-tool) {
    height: 100vh !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Make all parent containers fill height */
body:has(#wcdt-admin-tool) main,
body:has(#wcdt-admin-tool) .fusion-row,
body:has(#wcdt-admin-tool) .fusion-builder-row,
body:has(#wcdt-admin-tool) .post-content,
body:has(#wcdt-admin-tool) .entry-content,
body:has(#wcdt-admin-tool) .page-content,
body:has(#wcdt-admin-tool) article,
div:has(> #wcdt-admin-tool) {
    min-height: 100% !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove margin on the tool itself */
#wcdt-admin-tool {
    margin: 0 !important;
}

/* Brand Colors */
:root {
    --brand-dark: #061c1c;
    --brand-teal: #112626;
    --brand-cream: #ffead5;
    --brand-light: #f8f8f8;
    --brand-white: #ffffff;
    --brand-sage: #8fa29a;
    --brand-error: #dc3545;
    --wp-admin-bar-height: 0px; /* Default: no admin bar */
}

/* Only subtract admin bar height when logged in (WordPress adds .admin-bar class to body) */
.admin-bar {
    --wp-admin-bar-height: 32px;
}

.wcdt-admin-tool {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: visible;
    position: fixed;
    top: var(--wcdt-header-height, 100px);
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Hidden state - invisible and slightly down */
.wcdt-admin-tool.wcdt-hidden {
    opacity: 0;
    transform: translateY(20px);
}

/* Fade-in animation - smooth and luxurious */
.wcdt-admin-tool.wcdt-fade-in {
    animation: wcdt-tool-fade-in 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes wcdt-tool-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar - Configuration sections */
.wcdt-admin-sidebar {
    grid-column: 1;
    grid-row: 1;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    align-self: flex-start;
}

/* Ensure all content within sidebar respects width */
.wcdt-admin-sidebar * {
    max-width: 100%;
    box-sizing: border-box;
}

.wcdt-admin-sidebar h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Component header (Generelt, Jakke, Bukser) */
.wcdt-admin-component-header {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 10px 8px 8px 8px;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #dee2e6;
}

.wcdt-admin-component-header:first-of-type {
    margin-top: 0;
}

/* Section */
.wcdt-admin-section {
    background: white;
    border-radius: 6px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: visible; /* Allow tooltips to extend beyond section */
}

.wcdt-admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.wcdt-admin-section-header:hover {
    background-color: #f8f9fa;
}

.wcdt-admin-section-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    flex: 1;
    margin-right: 12px;
}

.wcdt-toggle-icon {
    font-size: 20px;
    color: #666;
    font-weight: 300;
    line-height: 1;
}

.wcdt-admin-section-content {
    padding: 12px 16px; /* Increased horizontal padding to prevent icon clipping */
    border-top: 1px solid #e9ecef;
    overflow: visible; /* Allow tooltips to extend beyond bounds */
}

/* Options grid */
.wcdt-admin-option-grid,
.wcdt-admin-fabric-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-items: stretch; /* Make grid items stretch to same height */
    max-width: 100%;
    overflow: visible;
}

.wcdt-admin-option {
    position: relative; /* For badge positioning */
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: white;
    display: flex;
    flex-direction: column;
    min-height: 100%; /* Stretch to fill grid cell */
    overflow: visible; /* Allow info icons to show */
}

.wcdt-admin-option:hover {
    border-color: #adb5bd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wcdt-admin-option.selected {
    border-color: var(--brand-teal);
    background-color: #e7f3ff;
}

.wcdt-admin-option img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 6px;
    flex-shrink: 0; /* Prevent image from shrinking */
}

.wcdt-admin-color-swatch {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    margin-bottom: 6px;
    border: 1px solid #dee2e6;
    flex-shrink: 0; /* Prevent swatch from shrinking */
}

.wcdt-admin-option-label {
    display: block;
    font-size: 13px;
    color: #495057;
    font-weight: 500;
    margin-bottom: 4px;
    flex-grow: 0; /* Don't grow, stay at natural size */
    flex-shrink: 0; /* Don't shrink */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Custom fabric name input */
.wcdt-admin-custom-fabric {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.wcdt-admin-custom-fabric label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

.wcdt-admin-custom-fabric-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
    max-width: 100%;
}

.wcdt-admin-custom-fabric-input:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.wcdt-admin-custom-fabric-input::placeholder {
    color: #adb5bd;
}

.wcdt-admin-option-price {
    display: block;
    font-size: 13px;
    color: var(--brand-sage);
    font-weight: 700; /* Bolder for visibility */
    margin-top: auto; /* Push to bottom of flex container */
    padding-top: 4px;
}

.wcdt-admin-option-included {
    display: none; /* Hide "Included" text for free options */
}

/* Badge for options with extra cost */
.wcdt-admin-option-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--brand-teal);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    line-height: 1;
}

/* Info icon for option descriptions */
.wcdt-info-icon {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--brand-teal);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    cursor: help;
    z-index: 50;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.wcdt-info-icon:hover {
    background: var(--brand-dark);
    transform: scale(1.1);
}

/* Tooltip for info icon */
.wcdt-info-tooltip {
    position: absolute;
    bottom: 100%; /* Position above the parent option card */
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background: white;
    color: #333;
    padding: 10px 12px;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    font-size: 12px;
    line-height: 1.5;
    max-width: 180px;
    width: max-content;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: all; /* Allow hovering over tooltip */
    border: 1px solid #dee2e6;
    white-space: normal;
    word-wrap: break-word;
}

/* Tooltip arrow pointing down */
.wcdt-info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: white;
}

.wcdt-info-icon:hover + .wcdt-info-tooltip,
.wcdt-info-tooltip:hover {
    opacity: 1;
    visibility: visible;
}

/* Main preview area */
.wcdt-admin-main {
    grid-column: 2;
    grid-row: 1;
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: none;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    align-self: flex-start;
}

.wcdt-admin-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
    gap: 16px;
    flex-wrap: wrap;
}

.wcdt-admin-preview h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    flex: 0 1 auto;
}

/* Product designer label - styles the "Designer: Jakkesæt" text */
.wcdt-admin-main > p:first-child {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.wcdt-admin-empty {
    text-align: center;
    color: #6c757d;
    padding: 40px 20px;
    font-size: 15px;
}

/* Preview grid */
.wcdt-admin-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wcdt-admin-preview-item {
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    cursor: pointer;
}

.wcdt-admin-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: #e9ecef;
}

.wcdt-admin-preview-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
    background: white;
}

.wcdt-admin-preview-color {
    width: 100%;
    height: 180px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #dee2e6;
}

.wcdt-admin-preview-placeholder {
    width: 100%;
    height: 180px;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.wcdt-admin-preview-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.wcdt-admin-preview-value {
    font-size: 14px;
    color: #212529;
    font-weight: 600;
}

/* Value styling for wide items */
.wcdt-admin-preview-item-wide .wcdt-admin-preview-value {
    font-size: 15px;
    margin-bottom: 8px;
}

.wcdt-admin-preview-price {
    font-size: 11px;
    color: var(--brand-sage);
    font-weight: 600;
    margin-top: 4px;
}

/* Form-based items span options (dynamic based on backend setting) */
/* Single column (default - same as regular items) */
.wcdt-admin-preview-item-span-1 {
    grid-column: span 1;
    padding: 0;
    background: transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Two columns */
.wcdt-admin-preview-item-span-2 {
    grid-column: span 2;
    padding: 0;
    background: transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Full width (spans entire row) */
.wcdt-admin-preview-item-span-full {
    grid-column: 1 / -1;
    padding: 0;
    background: transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Hover states for all span types */
.wcdt-admin-preview-item-span-1:hover,
.wcdt-admin-preview-item-span-2:hover,
.wcdt-admin-preview-item-span-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Legacy class for backwards compatibility (maps to full width) */
.wcdt-admin-preview-item-wide {
    grid-column: 1 / -1;
    padding: 0;
    background: transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wcdt-admin-preview-item-wide:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Content wrapper with image card + form box */
.wcdt-admin-preview-wide-content {
    display: flex;
    gap: 20px; /* Match grid gap for spacing between image and form */
    align-items: stretch; /* Same height */
    border-radius: 8px; /* Match regular items */
    overflow: hidden; /* Contain child border-radius */
    background: #f8f9fa; /* Match regular item background */
    padding: 16px; /* Match regular item padding */
    height: 100%; /* Fill parent container height */
    min-height: 100%; /* Ensure it stretches */
}

/* Image card (styled like regular items) */
.wcdt-admin-preview-image-card {
    flex-shrink: 0;
    flex-grow: 0;
    /* Match image height for 1:1 aspect ratio */
    width: 180px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    text-align: left; /* Left-align text */
    background: transparent; /* Parent has background */
    border-radius: 0; /* Handled by parent */
    padding: 0; /* No extra padding - parent handles it */
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.wcdt-admin-preview-item-wide:hover .wcdt-admin-preview-image-card {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: #e9ecef;
}

/* Image inside the card */
.wcdt-admin-preview-image-card img,
.wcdt-admin-preview-image-card .wcdt-admin-preview-color,
.wcdt-admin-preview-image-card .wcdt-admin-preview-placeholder {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.wcdt-admin-preview-image-card .wcdt-admin-preview-placeholder {
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.wcdt-admin-preview-image-card .wcdt-admin-preview-color {
    border: 1px solid #dee2e6;
}

/* Label in dark green under image */
.wcdt-form-label {
    color: var(--brand-teal);
    font-weight: 600;
    font-size: 13px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Form fields box */
.wcdt-admin-preview-form-box {
    flex: 1;
    padding: 0; /* Parent has padding */
    padding-left: 20px; /* Add left padding for the green border spacing */
    background: transparent; /* Parent has background */
    border-radius: 0; /* Handled by parent */
    border-left: 3px solid var(--brand-teal);
    text-align: left; /* Left-align all text */
}

/* Option value in form box (for select_then_form mode) */
.wcdt-admin-preview-form-box .wcdt-admin-preview-value {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dee2e6;
}

.wcdt-admin-preview-field {
    font-size: 12px;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 6px;
}

.wcdt-admin-preview-field:last-child {
    margin-bottom: 0;
}

.wcdt-preview-field-label {
    font-weight: 600;
    color: #333;
}

.wcdt-preview-field-value {
    color: #666;
}

/* Notes section */
.wcdt-admin-notes {
    margin-bottom: 20px;
}

.wcdt-admin-notes label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #495057;
}

.wcdt-admin-notes textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.wcdt-admin-notes textarea:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Total price display */
.wcdt-admin-total-price {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.wcdt-admin-price-label {
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    white-space: nowrap;
}

.wcdt-admin-price-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-dark);
    white-space: nowrap;
}

/* Original price container */
.wcdt-admin-price-original-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    margin-top: 4px;
}

/* Strikethrough original price */
.wcdt-admin-price-original {
    text-decoration: line-through;
    color: #999;
    font-weight: 500;
    font-size: 16px;
}

/* Sale line container (inline layout) */
.wcdt-admin-price-sale-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Savings amount */
.wcdt-admin-price-savings {
    color: white;
    font-weight: 600;
    font-size: 14px;
    background: var(--brand-dark);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Final price before add to cart */
.wcdt-admin-final-price {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 15px 0;
    margin-bottom: 15px;
    border-top: 1px solid #e9ecef;
}

.wcdt-admin-final-price-label {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
}

.wcdt-admin-final-price-value {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
}

/* Add to cart button */
.wcdt-admin-add-to-cart {
    width: 100%;
    padding: 16px;
    background: var(--brand-dark);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.wcdt-admin-add-to-cart:hover:not(:disabled) {
    background: var(--brand-dark);
}

.wcdt-admin-add-to-cart:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading state */
.wcdt-admin-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.6s ease-out;
}

.wcdt-admin-loading.wcdt-fade-out {
    opacity: 0;
}

.wcdt-spinner-container {
    text-align: center;
}

.wcdt-spinner {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.wcdt-spinner-ring {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 6px solid;
    border-radius: 50%;
    animation: wcdt-spinner-rotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--brand-teal) transparent transparent transparent;
}

.wcdt-spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
    border-color: var(--brand-teal) transparent transparent transparent;
}

.wcdt-spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
    border-color: var(--brand-sage) transparent transparent transparent;
}

.wcdt-spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
    border-color: var(--brand-cream) transparent transparent transparent;
}

.wcdt-spinner-ring:nth-child(4) {
    border-color: #8fa29a transparent transparent transparent;
}

@keyframes wcdt-spinner-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.wcdt-loading-text {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--brand-dark);
    letter-spacing: 0.5px;
    animation: wcdt-loading-pulse 1.5s ease-in-out infinite;
}

@keyframes wcdt-loading-pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Tablet Responsive (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .wcdt-admin-sidebar {
        flex: 0 0 320px;
    }

    .wcdt-admin-option-grid,
    .wcdt-admin-fabric-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .wcdt-admin-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 16px;
    }

    .wcdt-admin-tool {
        gap: 20px;
        padding: 15px;
    }

    /* Preview header responsive for tablet portrait */
    .wcdt-admin-preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .wcdt-admin-preview h2 {
        font-size: 20px;
    }

    .wcdt-admin-total-price {
        width: 100%;
        justify-content: space-between;
        background: #f8f9fa;
        padding: 12px 16px;
        border-radius: 6px;
    }

    .wcdt-admin-price-label {
        font-size: 15px;
    }

    .wcdt-admin-price-value {
        font-size: 24px;
    }

    /* Designer label smaller on tablet */
    .wcdt-admin-main > p:first-child {
        font-size: 13px;
        margin-bottom: 6px;
    }
}

/* Large Tablet/Small Desktop (1024px - 1200px) */
@media (max-width: 1200px) {
    .wcdt-admin-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* Mobile Responsive (≤767px) */
@media (max-width: 767px) {
    /* Mobile tab navigation */
    .wcdt-mobile-tabs {
        display: flex;
        gap: 0;
        background: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
        position: sticky;
        top: 0;
        z-index: 100;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .wcdt-mobile-tab {
        flex: 1;
        padding: 16px;
        background: white;
        border: none;
        border-bottom: 3px solid transparent;
        font-size: 15px;
        font-weight: 600;
        color: #6c757d;
        cursor: pointer;
        transition: all 0.2s;
        text-align: center;
    }

    .wcdt-mobile-tab.active {
        color: var(--brand-teal);
        border-bottom-color: var(--brand-teal);
        background: #fff;
    }

    /* Hide panels based on active tab */
    .wcdt-hidden-mobile {
        display: none !important;
    }

    /* Main container adjustments */
    .wcdt-admin-tool {
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: none;
        overflow: visible;
    }

    /* Sidebar mobile styles */
    .wcdt-admin-sidebar {
        flex: none;
        position: relative;
        top: 0;
        max-height: none;
        overflow-y: visible;
        border-radius: 0;
        padding: 15px;
        margin-bottom: 70px; /* Space for sticky action bar */
    }

    .wcdt-admin-sidebar h2 {
        font-size: 18px;
        margin-bottom: 16px;
    }

    /* Main panel mobile styles */
    .wcdt-admin-main {
        position: relative;
        top: 0;
        max-height: none;
        overflow-y: visible;
        border-radius: 0;
        padding: 15px;
        margin-bottom: 70px; /* Space for sticky action bar */
    }

    /* Preview header mobile - stack vertically */
    .wcdt-admin-preview-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding-bottom: 12px;
        margin-bottom: 16px;
    }

    .wcdt-admin-preview h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }

    /* Mobile total price - full width with prominent display */
    .wcdt-admin-total-price {
        width: 100%;
        justify-content: space-between;
        background: var(--brand-dark);
        color: white;
        padding: 14px 16px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .wcdt-admin-price-label {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 600;
    }

    .wcdt-admin-price-value {
        font-size: 22px;
        color: white;
        font-weight: 700;
    }

    /* Designer label mobile - more compact */
    .wcdt-admin-main > p:first-child {
        font-size: 12px;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    /* Single column grids on mobile */
    .wcdt-admin-option-grid,
    .wcdt-admin-fabric-grid,
    .wcdt-child-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Larger touch targets */
    .wcdt-admin-option {
        min-height: 60px;
        padding: 12px;
    }

    .wcdt-admin-section-header {
        padding: 14px 16px;
        min-height: 48px;
    }

    /* Preview grid mobile */
    .wcdt-admin-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }

    /* Stack wide items content vertically on mobile */
    .wcdt-admin-preview-wide-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .wcdt-admin-preview-image-card {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .wcdt-admin-preview-form-box {
        padding-left: 15px;
    }

    /* Sticky mobile action bar */
    .wcdt-mobile-action-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 2px solid #dee2e6;
        padding: 12px 15px;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
        z-index: 99;
    }

    .wcdt-mobile-add-to-cart {
        width: 100%;
        padding: 16px;
        background: var(--brand-dark);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: background-color 0.2s;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .wcdt-mobile-add-to-cart:hover:not(:disabled) {
        background: var(--brand-teal);
    }

    .wcdt-mobile-add-to-cart:disabled {
        background: #6c757d;
        cursor: not-allowed;
        opacity: 0.6;
    }

    /* Hide desktop Add to Cart button on mobile */
    .wcdt-admin-main .wcdt-admin-add-to-cart {
        display: none;
    }

    /* Adjust component headers */
    .wcdt-admin-component-header {
        font-size: 14px;
        padding: 8px;
        margin-top: 16px;
    }

    /* Adjust section styling */
    .wcdt-admin-section {
        margin-bottom: 10px;
    }

    .wcdt-admin-section-header h3 {
        font-size: 14px;
    }

    /* Form inputs larger touch targets */
    .wcdt-admin-custom-fabric-input,
    .wcdt-category-input,
    .wcdt-admin-notes textarea {
        min-height: 48px;
        font-size: 16px; /* Prevent iOS zoom */
    }

    /* Pattern modal full screen on mobile */
    .wcdt-modal-overlay {
        padding: 0;
    }

    .wcdt-modal-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    /* Zoom modal mobile - stack vertically */
    .wcdt-zoom-modal-overlay {
        padding: 0;
    }

    .wcdt-zoom-modal-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        flex-direction: column;
    }

    .wcdt-zoom-modal-image {
        max-width: 100%;
        min-height: 300px;
        padding: 20px;
    }

    .wcdt-zoom-modal-details {
        max-width: 100%;
        padding: 24px 20px;
    }

    .wcdt-zoom-modal-label {
        font-size: 20px;
    }

    .wcdt-zoom-modal-value {
        font-size: 16px;
    }

    /* Original price mobile responsive */
    .wcdt-admin-price-original {
        font-size: 14px;
    }

    .wcdt-admin-price-savings {
        font-size: 12px;
        padding: 2px 6px;
    }

    /* Zoom button always visible on mobile */
    .wcdt-preview-zoom-btn {
        opacity: 1;
        transform: scale(1);
    }

    /* Hierarchical sub-steps mobile */
    .wcdt-child-options-container {
        margin-left: 12px;
        padding-left: 12px;
    }
}

/* Option categories */
.wcdt-option-category {
    margin-bottom: 20px;
}

.wcdt-option-category:last-child {
    margin-bottom: 0;
}

.wcdt-category-header {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin: 0 0 12px 0;
    padding: 8px 12px;
    background: #e9ecef;
    border-left: 3px solid var(--brand-teal);
    border-radius: 3px;
}

/* Custom input field for options that require it */
.wcdt-custom-input-field {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    width: 100%;
    box-sizing: border-box;
}

.wcdt-admin-option .wcdt-custom-input-field {
    margin-top: 8px;
    padding: 8px;
}

.wcdt-custom-input-field label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
}

.wcdt-custom-input-field input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
    max-width: 100%;
}

.wcdt-custom-input-field input:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.wcdt-custom-input-field input::placeholder {
    color: #adb5bd;
}

/* Scrollbar styling for sticky panels */
.wcdt-admin-main::-webkit-scrollbar,
.wcdt-admin-sidebar::-webkit-scrollbar {
    width: 8px;
}

.wcdt-admin-main::-webkit-scrollbar-track,
.wcdt-admin-sidebar::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 4px;
}

.wcdt-admin-main::-webkit-scrollbar-thumb,
.wcdt-admin-sidebar::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

.wcdt-admin-main::-webkit-scrollbar-thumb:hover,
.wcdt-admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: #868e96;
}

/* Tab Switcher */
.wcdt-admin-tabs {
    display: flex;
    gap: 10px;
    padding: 20px 20px 0 20px;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.wcdt-tab {
    padding: 12px 24px;
    background: white;
    border: 2px solid #dee2e6;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
}

.wcdt-tab:hover {
    background: #f8f9fa;
    color: #495057;
}

.wcdt-tab.active {
    background: white;
    color: var(--brand-teal);
    border-color: var(--brand-teal);
    border-bottom-color: white;
    position: relative;
    bottom: -2px;
}

.wcdt-admin-content {
    display: flex;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* Category Manager */
.wcdt-category-manager {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wcdt-category-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.wcdt-category-manager-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
}

.wcdt-option-type-select {
    padding: 10px 15px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.wcdt-option-type-select:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Category List */
.wcdt-category-list {
    margin-bottom: 30px;
    min-height: 200px;
}

.wcdt-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.wcdt-category-item:hover {
    border-color: #adb5bd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wcdt-category-item.dragging {
    opacity: 0.5;
    border-color: var(--brand-teal);
}

.wcdt-category-handle {
    font-size: 18px;
    color: #adb5bd;
    cursor: grab;
    user-select: none;
}

.wcdt-category-handle:active {
    cursor: grabbing;
}

.wcdt-category-order {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    min-width: 30px;
}

.wcdt-category-name {
    flex: 1;
    font-size: 15px;
    color: #212529;
}

.wcdt-category-actions {
    display: flex;
    gap: 8px;
}

.wcdt-btn-edit,
.wcdt-btn-delete,
.wcdt-btn-save,
.wcdt-btn-cancel {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.wcdt-btn-edit {
    background: var(--brand-teal);
    color: white;
}

.wcdt-btn-edit:hover {
    background: var(--brand-dark);
}

.wcdt-btn-delete {
    background: #dc3545;
    color: white;
    font-size: 18px;
    padding: 4px 10px;
}

.wcdt-btn-delete:hover {
    background: #c82333;
}

.wcdt-btn-save {
    background: var(--brand-dark);
    color: white;
}

.wcdt-btn-save:hover {
    background: var(--brand-dark);
}

.wcdt-btn-cancel {
    background: #6c757d;
    color: white;
}

.wcdt-btn-cancel:hover {
    background: #545b62;
}

/* Inline edit input */
.wcdt-category-edit-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--brand-teal);
    border-radius: 4px;
    font-size: 15px;
}

.wcdt-category-edit-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Add Category Section */
.wcdt-add-category {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px dashed #dee2e6;
}

.wcdt-category-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.wcdt-category-input:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.wcdt-btn-add {
    padding: 12px 24px;
    background: var(--brand-dark);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.wcdt-btn-add:hover {
    background: var(--brand-dark);
}

.wcdt-btn-add:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading and Empty States */
.wcdt-category-list .wcdt-loading,
.wcdt-category-list .wcdt-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 15px;
}

.wcdt-category-list .wcdt-empty {
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px dashed #dee2e6;
}

/* Section highlight animation (for click-to-scroll) */
@keyframes wcdt-highlight {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(17, 38, 38, 0.1);
    }
}

.wcdt-section-highlight {
    animation: wcdt-highlight 1.5s ease-in-out;
}

/* Pattern Manager Modal */
.wcdt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.wcdt-modal-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.wcdt-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid #e9ecef;
}

.wcdt-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.wcdt-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.wcdt-modal-close:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.wcdt-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.wcdt-pattern-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.wcdt-pattern-table thead {
    background: #f8f9fa;
}

.wcdt-pattern-table th {
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.wcdt-pattern-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.wcdt-pattern-table tbody tr:last-child td {
    border-bottom: none;
}

.wcdt-pattern-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.wcdt-pattern-input:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.wcdt-pattern-input[type="number"] {
    max-width: 120px;
}

.wcdt-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 2px solid #e9ecef;
    background: #f8f9fa;
}

.wcdt-modal-footer .button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.wcdt-modal-footer .button-secondary {
    background: #6c757d;
    color: white;
    border: none;
}

.wcdt-modal-footer .button-secondary:hover:not(:disabled) {
    background: #545b62;
}

.wcdt-modal-footer .button-primary {
    background: var(--brand-dark);
    color: white;
    border: none;
}

.wcdt-modal-footer .button-primary:hover:not(:disabled) {
    background: var(--brand-teal);
}

.wcdt-modal-footer .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Zoom Button on Preview Items */
.wcdt-preview-zoom-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
}

.wcdt-admin-preview-item:hover .wcdt-preview-zoom-btn {
    opacity: 1;
    transform: scale(1);
}

.wcdt-preview-zoom-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.wcdt-preview-zoom-btn:active {
    transform: scale(0.95);
}

/* Zoom Modal */
.wcdt-zoom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
    animation: wcdt-zoom-fade-in 0.2s ease;
}

@keyframes wcdt-zoom-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.wcdt-zoom-modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    position: relative;
    animation: wcdt-zoom-scale-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wcdt-zoom-scale-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.wcdt-zoom-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    padding: 0;
}

.wcdt-zoom-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.wcdt-zoom-modal-image {
    flex: 1;
    max-width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 30px;
}

.wcdt-zoom-modal-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.wcdt-zoom-modal-color {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.wcdt-zoom-modal-placeholder {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.wcdt-zoom-modal-details {
    flex: 1;
    max-width: 50%;
    padding: 40px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wcdt-zoom-modal-label {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--brand-dark);
    padding-right: 40px; /* Space for close button */
}

.wcdt-zoom-modal-value {
    font-size: 18px;
    color: #495057;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

.wcdt-zoom-modal-field {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 15px;
    line-height: 1.6;
}

.wcdt-zoom-modal-field-label {
    font-weight: 600;
    color: var(--brand-teal);
}

.wcdt-zoom-modal-field-value {
    color: #495057;
}

/* Indicators container (weight + seasons side by side) */
.wcdt-zoom-modal-indicators {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    flex-wrap: wrap;
}

/* Season indicator (matches weight indicator style) */
.wcdt-season-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.wcdt-season-circle {
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}

.wcdt-season-circle-bg {
    stroke: #e5e7eb;
}

.wcdt-season-circle-progress {
    stroke: currentColor;
}

/* Season-specific colors (matching weight indicator color scheme) */
.wcdt-season-indicator[data-season="spring-summer"] {
    color: var(--brand-teal);
}

.wcdt-season-indicator[data-season="fall-winter"] {
    color: var(--brand-teal);
}

.wcdt-season-indicator[data-season="all"] {
    color: var(--brand-teal);
}

.wcdt-season-circle svg {
    fill: var(--brand-dark);
}

.wcdt-season-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: -10px;
}

.wcdt-season-value {
    font-size: 12px;
    font-weight: 500;
    color: var(--brand-sage);
    text-align: center;
}

.wcdt-zoom-modal-field-price {
    color: #16a34a;
    font-weight: 600;
    font-size: 14px;
}

.wcdt-zoom-modal-form-fields {
    margin-top: 8px;
}

.wcdt-zoom-modal-form-fields h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-dark);
}

.wcdt-zoom-modal-fabric-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wcdt-zoom-modal-description {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    font-style: italic;
}

.wcdt-zoom-modal-price {
    font-size: 20px;
    font-weight: 700;
    color: #16a34a;
    margin-top: 16px;
    padding: 16px;
    background: #f0fdf4;
    border-radius: 8px;
    text-align: center;
}

.wcdt-zoom-modal-edit-btn {
    margin-top: auto;
    padding: 14px 24px;
    background: var(--brand-dark);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wcdt-zoom-modal-edit-btn:hover {
    background: var(--brand-teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wcdt-zoom-modal-edit-btn:active {
    transform: translateY(0);
}

/* Hover Preview Overlay (Desktop Only) */
.wcdt-hover-preview-overlay {
    grid-column: 2;
    grid-row: 1;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    position: relative; /* For absolute positioning of description */
}

.wcdt-hover-preview-overlay.wcdt-active {
    opacity: 1;
    visibility: visible;
    animation: wcdt-hover-preview-fade-in 0.2s ease-out;
}

/* Selection animation - morph into selected preview */
.wcdt-hover-preview-overlay.wcdt-selecting {
    animation: wcdt-hover-preview-select 0.25s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    will-change: transform, opacity;
}

@keyframes wcdt-hover-preview-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes wcdt-hover-preview-select {
    0% {
        opacity: 1;
        transform: scale(1) translateZ(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.9) translateZ(0);
    }
}

.wcdt-hover-preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 90%;
    height: 100%;
    padding: 0;
}

.wcdt-hover-preview-overlay.wcdt-active .wcdt-hover-preview-content {
    animation: wcdt-hover-preview-scale-in 0.3s ease-out;
}

@keyframes wcdt-hover-preview-scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wcdt-hover-preview-image {
    max-width: 800px;
    max-height: 65vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.wcdt-hover-preview-color {
    width: 450px;
    height: 450px;
    max-width: 800px;
    max-height: 65vh;
    border-radius: 12px;
    border: 3px solid #dee2e6;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.wcdt-hover-preview-placeholder {
    width: 450px;
    height: 450px;
    max-width: 800px;
    max-height: 65vh;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    justify-content: center;
    font-size: 100px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.wcdt-hover-preview-overlay.wcdt-active .wcdt-hover-preview-label {
    animation: wcdt-hover-preview-label-in 0.3s ease-out 0.05s backwards;
}

@keyframes wcdt-hover-preview-label-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wcdt-hover-preview-label {
    font-size: 22px;
    font-weight: 600;
    color: var(--brand-dark);
    text-align: center;
    padding: 12px 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 800px;
}

.wcdt-hover-preview-description {
    position: absolute;
    bottom: 20px; /* Closer to very bottom */
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: 400;
    color: #666;
    text-align: center;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    max-width: 700px; /* Max width constraint */
    width: max-content; /* Fit content naturally */
    max-height: 80px; /* Limit description height */
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Show max 3 lines */
    -webkit-box-orient: vertical;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0; /* Hidden by default */
    transition: none; /* No transition to avoid blinking */
}

/* Hide empty descriptions completely */
.wcdt-hover-preview-description:empty {
    display: none;
}

/* No animation for description - instant appearance to avoid blinking */
.wcdt-hover-preview-overlay.wcdt-active .wcdt-hover-preview-description:not(:empty) {
    opacity: 1;
}

/* Hierarchical Sub-Steps Styles */
.wcdt-admin-hierarchy-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wcdt-parent-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wcdt-child-options-container {
    margin-left: 20px;
    padding-left: 16px;
    border-left: 3px solid var(--brand-sage);
    position: relative;
}

.wcdt-child-options-container::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--brand-sage) 0%, transparent 100%);
}

.wcdt-child-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.wcdt-child-option {
    background: #f8f9fa;
    border-color: var(--brand-sage);
    opacity: 0.95;
}

.wcdt-child-option:hover {
    border-color: var(--brand-teal);
    opacity: 1;
    background: white;
}

.wcdt-child-option.selected {
    border-color: var(--brand-teal);
    background-color: #e7f3ff;
    opacity: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Responsive: Stack child options on mobile */
@media (max-width: 768px) {
    .wcdt-child-options-container {
        margin-left: 12px;
        padding-left: 12px;
    }

    .wcdt-child-grid {
        grid-template-columns: 1fr;
    }
}

/* Form-Based Selection Display - Checklist Style (copied from frontend.css) */
.wcdt-selection-info-full {
    padding: var(--space-4, 16px);
    width: 100%;
    height: 100%;
    text-align: left !important;
    display: flex;
    flex-direction: column;
}

.wcdt-selection-category-full {
    font-family: 'Philosopher', serif;
    font-size: 16px;
    color: var(--text-primary, #171717);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: var(--space-3, 12px);
    font-weight: 700;
    border-bottom: 1px solid var(--neutral-200, #e5e5e5);
    padding-bottom: var(--space-2, 8px);
}

.wcdt-selection-fields-checklist {
    display: flex;
    flex-direction: column;
    gap: var(--space-3, 12px);
}

.wcdt-selection-field-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3, 12px);
    padding: var(--space-2, 8px) 0;
}

.wcdt-field-checkmark {
    font-size: 16px;
    color: var(--brand-primary, #061c1c);
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.wcdt-field-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wcdt-field-label {
    font-size: var(--font-xs, 0.75rem);
    color: var(--text-secondary, #525252);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wcdt-field-value-wrapper {
    display: flex;
    align-items: baseline;
    gap: var(--space-2, 8px);
}

.wcdt-field-value {
    font-size: var(--font-sm, 0.875rem);
    color: var(--text-primary, #171717);
    font-weight: 500;
    line-height: 1.4;
}

.wcdt-field-price {
    font-size: var(--font-xs, 0.75rem);
    color: var(--brand-primary, #061c1c);
    font-weight: 600;
    white-space: nowrap;
}
