/**
 * Nightingale Coastal Designer - Main Styles v2.8.2
 * 
 * Properly isolated styles that won't conflict with WPBakery.
 * Uses :where() selectors for zero specificity where appropriate.
 * 
 * v2.8.2: Unified checkout button styles, error state, processing animation
 * 
 * @package NightingaleCoastalDesigner
 * @version 2.8.2
 */

/* ========================================================================
   CSS VARIABLES
   ======================================================================== */

:root {
    --ncd-primary: #4A90A4;
    --ncd-primary-dark: #1A5F7A;
    --ncd-primary-light: #B5E2EA;
    --ncd-secondary: #48A9A6;
    --ncd-accent: #E8A87C;
    --ncd-sand: #B5A48B;
    --ncd-sand-light: #D4C4A8;
    --ncd-cream: #F5F5F0;
    --ncd-white: #FFFFFF;
    --ncd-dark: #1a1a2e;
    --ncd-darker: #0d0d1a;
    --ncd-text: #2C3E50;
    --ncd-text-light: rgba(255,255,255,0.8);
    --ncd-border: rgba(255,255,255,0.1);
    --ncd-shadow: 0 4px 20px rgba(0,0,0,0.15);
    --ncd-shadow-lg: 0 8px 40px rgba(0,0,0,0.25);
    --ncd-radius: 12px;
    --ncd-radius-lg: 20px;
    --ncd-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ncd-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --ncd-font-display: 'Playfair Display', Georgia, serif;
}

/* ========================================================================
   BASE STYLES (Scoped to .ncd-app)
   ======================================================================== */

.ncd-app {
    position: relative;
    min-height: 100vh;
    font-family: var(--ncd-font-sans);
    color: var(--ncd-white);
    background: var(--ncd-dark);
    overflow-x: hidden;
}

.ncd-app *,
.ncd-app *::before,
.ncd-app *::after {
    box-sizing: border-box;
}

.ncd-app h1, .ncd-app h2, .ncd-app h3, .ncd-app h4 {
    font-family: var(--ncd-font-display);
    font-weight: 600;
    margin: 0 0 0.5em;
}

.ncd-app p { margin: 0 0 1em; line-height: 1.6; }

.ncd-app a { color: var(--ncd-primary); text-decoration: none; }
.ncd-app a:hover { text-decoration: underline; }

/* ========================================================================
   LAYOUT
   ======================================================================== */

.ncd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--ncd-border);
}

.ncd-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--ncd-font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.ncd-main {
    position: relative;
    min-height: 100vh;
    padding: 100px 24px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ncd-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    font-size: 0.85rem;
    color: var(--ncd-text-light);
    z-index: 100;
}

.ncd-version {
    opacity: 0.6;
    font-size: 0.75rem;
}

/* ========================================================================
   STEPS
   ======================================================================== */

.ncd-step {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    animation: ncdFadeIn 0.4s ease;
}

@keyframes ncdFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ncd-step-header {
    text-align: center;
    margin-bottom: 32px;
}

.ncd-step-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.ncd-step-header p {
    color: var(--ncd-text-light);
    font-size: 1.1rem;
}

.ncd-step-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.ncd-actions-centered {
    justify-content: center;
}

/* ========================================================================
   BUTTONS
   ======================================================================== */

.ncd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--ncd-font-sans);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--ncd-radius);
    cursor: pointer;
    transition: all var(--ncd-transition);
    white-space: nowrap;
}

.ncd-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ncd-btn-primary {
    background: linear-gradient(135deg, var(--ncd-primary), var(--ncd-secondary));
    color: var(--ncd-white);
    box-shadow: 0 4px 15px rgba(74, 144, 164, 0.4);
}

.ncd-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 164, 0.5);
}

.ncd-btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--ncd-white);
    border: 1px solid var(--ncd-border);
}

.ncd-btn-secondary:hover:not(:disabled) {
    background: rgba(255,255,255,0.15);
}

.ncd-btn-ghost {
    background: transparent;
    color: var(--ncd-text-light);
}

.ncd-btn-ghost:hover:not(:disabled) {
    color: var(--ncd-white);
}

.ncd-btn-lg {
    padding: 18px 36px;
    font-size: 1.125rem;
}

/* Shimmer effect */
.ncd-shimmer {
    position: relative;
    overflow: hidden;
}

.ncd-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: ncdShimmer 2s infinite;
}

@keyframes ncdShimmer {
    to { left: 100%; }
}

/* ========================================================================
   WELCOME STEP
   ======================================================================== */

.ncd-step-welcome {
    text-align: center;
    max-width: 700px;
}

.ncd-welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.ncd-welcome-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ncd-primary), var(--ncd-secondary));
    border-radius: 50%;
    animation: ncdPulse 2s ease infinite;
}

@keyframes ncdPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(74, 144, 164, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(74, 144, 164, 0); }
}

.ncd-welcome-title {
    font-size: 3rem;
    line-height: 1.2;
}

.ncd-highlight {
    background: linear-gradient(90deg, var(--ncd-primary), var(--ncd-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ncd-welcome-subtitle {
    font-size: 1.25rem;
    color: var(--ncd-text-light);
    max-width: 500px;
}

.ncd-welcome-features {
    display: flex;
    gap: 32px;
    margin-top: 16px;
}

.ncd-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ncd-text-light);
    font-size: 0.9rem;
}

/* ========================================================================
   GRIDS
   ======================================================================== */

.ncd-room-grid,
.ncd-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.ncd-package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
}

/* ========================================================================
   CARDS
   ======================================================================== */

.ncd-room-card,
.ncd-style-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    background: rgba(255,255,255,0.05);
    border: 2px solid transparent;
    border-radius: var(--ncd-radius-lg);
    cursor: pointer;
    transition: all var(--ncd-transition);
    text-align: center;
}

.ncd-room-card:hover,
.ncd-style-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-4px);
}

.ncd-room-card.selected,
.ncd-style-card.selected {
    border-color: var(--ncd-primary);
    background: rgba(74, 144, 164, 0.1);
}

.ncd-room-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ncd-primary), var(--ncd-secondary));
    border-radius: 50%;
}

.ncd-room-card h4,
.ncd-style-card h4 {
    font-size: 1.1rem;
    margin: 0;
}

.ncd-room-card p,
.ncd-style-card p {
    font-size: 0.85rem;
    color: var(--ncd-text-light);
    margin: 0;
}

.ncd-room-check,
.ncd-style-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ncd-secondary);
    border-radius: 50%;
}

.ncd-style-colors {
    display: flex;
    gap: 4px;
}

.ncd-style-color {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
}

/* ========================================================================
   PACKAGE CARDS
   ======================================================================== */

.ncd-package-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    background: rgba(255,255,255,0.05);
    border: 2px solid var(--ncd-border);
    border-radius: var(--ncd-radius-lg);
    transition: all var(--ncd-transition);
}

.ncd-package-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.2);
}

.ncd-package-card.featured {
    border-color: var(--ncd-primary);
    background: rgba(74, 144, 164, 0.1);
}

.ncd-package-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--ncd-primary), var(--ncd-secondary));
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.ncd-package-name {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.ncd-package-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ncd-primary);
    margin-bottom: 12px;
}

/* v3.1.4: Consultation hours display */
.ncd-package-hours {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: rgba(74, 144, 164, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 164, 0.15);
}

.ncd-hours-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ncd-primary);
}

.ncd-hours-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.ncd-package-description {
    color: var(--ncd-text-light);
    margin-bottom: 24px;
}

.ncd-package-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    flex: 1;
}

.ncd-package-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.95rem;
    color: var(--ncd-text-light);
}

.ncd-package-features li svg {
    flex-shrink: 0;
    color: var(--ncd-secondary);
}

/* ========================================================================
   STEP INDICATOR
   ======================================================================== */

.ncd-step-indicator {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    z-index: 99;
    overflow-x: auto;
}

.ncd-steps-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: max-content;
}

.ncd-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ncd-step-dot {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border: 2px solid var(--ncd-border);
    border-radius: 50%;
    transition: all var(--ncd-transition);
}

.ncd-step-dot.active {
    background: var(--ncd-primary);
    border-color: var(--ncd-primary);
}

.ncd-step-dot.complete {
    background: var(--ncd-secondary);
    border-color: var(--ncd-secondary);
}

.ncd-step-dot.clickable {
    cursor: pointer;
}

.ncd-step-dot.clickable:hover {
    transform: scale(1.1);
}

.ncd-step-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    color: var(--ncd-text-light);
}

.ncd-step-number {
    display: none;
}

.ncd-step-line {
    width: 40px;
    height: 2px;
    background: var(--ncd-border);
    margin-bottom: 24px;
}

.ncd-step-line.complete {
    background: var(--ncd-secondary);
}

/* ========================================================================
   PROGRESS RING
   ======================================================================== */

.ncd-progress-ring {
    transform: rotate(-90deg);
}

/* ========================================================================
   TINDER DECK
   ======================================================================== */

.ncd-tinder-deck {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.ncd-tinder-stack {
    position: relative;
    width: 100%;
    height: 450px;
}

.ncd-tinder-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--ncd-radius-lg);
    overflow: hidden;
    box-shadow: var(--ncd-shadow-lg);
    user-select: none;
}

.ncd-tinder-card-stack-2 {
    transform: scale(0.9) translateY(-20px);
    opacity: 0.5;
}

.ncd-tinder-card-stack-1 {
    transform: scale(0.95) translateY(-10px);
    opacity: 0.75;
}

.ncd-tinder-card-active {
    cursor: grab;
    z-index: 10;
}

.ncd-tinder-card-active:active {
    cursor: grabbing;
}

.ncd-tinder-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ncd-tinder-card-inner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.ncd-tinder-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ncd-tinder-title {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.ncd-tinder-description {
    font-size: 0.9rem;
    color: var(--ncd-text-light);
    margin-bottom: 16px;
}

.ncd-tinder-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ncd-tinder-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}

.ncd-tinder-progress-fill {
    height: 100%;
    background: var(--ncd-primary);
    transition: width 0.3s ease;
}

.ncd-tinder-progress-text {
    font-size: 0.75rem;
    color: var(--ncd-text-light);
}

.ncd-swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) rotate(-15deg);
    padding: 12px 24px;
    font-size: 2rem;
    font-weight: 700;
    border: 4px solid;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ncd-swipe-indicator.nope {
    left: 20px;
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.ncd-swipe-indicator.like {
    right: 20px;
    color: #51cf66;
    border-color: #51cf66;
}

.ncd-swipe-indicator.visible {
    opacity: 1;
}

.ncd-tinder-buttons {
    display: flex;
    gap: 24px;
}

.ncd-tinder-btn {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--ncd-transition);
}

.ncd-btn-nope {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.ncd-btn-nope:hover {
    background: #ff6b6b;
    color: white;
    transform: scale(1.1);
}

.ncd-btn-like {
    background: rgba(81, 207, 102, 0.2);
    color: #51cf66;
}

.ncd-btn-like:hover {
    background: #51cf66;
    color: white;
    transform: scale(1.1);
}

.ncd-tinder-instructions {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--ncd-text-light);
}

.ncd-tinder-complete {
    text-align: center;
    padding: 48px;
}

.ncd-complete-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ncd-secondary);
    border-radius: 50%;
    margin: 0 auto 24px;
}

/* v3.2.1: Proceed banner after 20 swipes */
.ncd-tinder-proceed-banner {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #a3d9a5;
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 16px;
    animation: ncd-banner-slideIn 0.4s ease;
}
.ncd-proceed-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.ncd-proceed-text {
    font-size: 0.9rem;
    color: #155724;
    flex: 1;
    min-width: 200px;
}
.ncd-tinder-continue-btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    animation: ncd-btn-pulse 2s infinite;
}
.ncd-tinder-complete .ncd-tinder-continue-btn {
    margin-top: 24px;
    animation: ncd-btn-pulse 2s infinite;
}
@keyframes ncd-banner-slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes ncd-btn-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 144, 164, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(74, 144, 164, 0); }
}
/* v3.2.1: Green progress bar when 20-card threshold reached */
.ncd-tinder-progress-fill.ncd-progress-complete {
    background: linear-gradient(90deg, #28a745, #48c774) !important;
}

/* ========================================================================
   MAGIC WAND
   ======================================================================== */

.ncd-magic-wand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--ncd-accent), #E85D75);
    color: white;
    border: none;
    border-radius: var(--ncd-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ncd-transition);
}

.ncd-magic-wand:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(232, 168, 124, 0.4);
}

.ncd-magic-wand:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.ncd-wand-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: ncdSpin 0.8s linear infinite;
}

@keyframes ncdSpin {
    to { transform: rotate(360deg); }
}

/* ========================================================================
   PREVIEW
   ======================================================================== */

.ncd-preview-container {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16/9;
    background: rgba(0,0,0,0.3);
    border-radius: var(--ncd-radius-lg);
    overflow: hidden;
    margin: 0 auto;
}

.ncd-preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--ncd-text-light);
}

.ncd-preview-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.ncd-preview-image-wrapper {
    width: 100%;
    height: 100%;
}

.ncd-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================================================
   LOADING
   ======================================================================== */

.ncd-loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.ncd-loading-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.ncd-loading-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ncd-primary), var(--ncd-secondary));
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: ncdPulse 2s ease infinite;
}

.ncd-loading-text {
    font-size: 1.1rem;
    color: var(--ncd-text-light);
    margin-bottom: 16px;
}

.ncd-loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.ncd-loading-bar-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--ncd-primary), var(--ncd-secondary));
    animation: ncdLoadingBar 1.5s ease infinite;
}

@keyframes ncdLoadingBar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* ========================================================================
   ERROR TOAST
   ======================================================================== */

.ncd-error-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #ff6b6b;
    color: white;
    border-radius: var(--ncd-radius);
    font-size: 0.9rem;
    z-index: 1000;
    animation: ncdSlideUp 0.3s ease;
}

@keyframes ncdSlideUp {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.ncd-error-toast button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* ========================================================================
   MOODBOARD
   ======================================================================== */

.ncd-moodboard-preview {
    max-width: 600px;
    margin: 0 auto;
    padding: 32px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--ncd-radius-lg);
}

.ncd-color-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ncd-moodboard-color {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.1);
}

/* ========================================================================
   MODAL
   ======================================================================== */

.ncd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.ncd-modal {
    width: 100%;
    max-width: 500px;
    background: var(--ncd-dark);
    border-radius: var(--ncd-radius-lg);
    overflow: hidden;
}

.ncd-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ncd-border);
}

.ncd-modal-header h3 {
    margin: 0;
}

.ncd-modal-close {
    background: none;
    border: none;
    color: var(--ncd-text-light);
    cursor: pointer;
    padding: 4px;
}

.ncd-modal-body {
    padding: 24px;
}

.ncd-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--ncd-border);
}

.ncd-rating-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.ncd-star {
    background: none;
    border: none;
    font-size: 2rem;
    color: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: color 0.2s ease;
}

.ncd-star.active {
    color: #ffd700;
}

.ncd-modal textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--ncd-border);
    border-radius: var(--ncd-radius);
    color: white;
    font-family: var(--ncd-font-sans);
    resize: vertical;
}

.ncd-modal textarea:focus {
    outline: none;
    border-color: var(--ncd-primary);
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */

@media (max-width: 768px) {
    .ncd-header {
        padding: 12px 16px;
    }
    
    .ncd-main {
        padding: 120px 16px 80px;
    }
    
    .ncd-step-indicator {
        padding: 12px 16px;
    }
    
    .ncd-welcome-title {
        font-size: 2rem;
    }
    
    .ncd-welcome-features {
        flex-direction: column;
        gap: 16px;
    }
    
    .ncd-room-grid,
    .ncd-style-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .ncd-package-grid {
        grid-template-columns: 1fr;
    }
    
    .ncd-tinder-stack {
        height: 380px;
    }
    
    .ncd-step-label {
        display: none;
    }
    
    .ncd-step-line {
        width: 24px;
        margin-bottom: 0;
    }
}

/* ========================================================================
   v2.6.0 ADDITIONS - Upload Step & Carousel
   ======================================================================== */

/* Upload Step Styles */
.ncd-step-upload {
    max-width: 700px;
}

.ncd-upload-container {
    margin: 32px 0;
}

.ncd-upload-info {
    margin-top: 16px;
    text-align: center;
}

.ncd-upload-success {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(81, 207, 102, 0.2);
    border-radius: 20px;
    color: #51cf66;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.ncd-upload-hint {
    font-size: 0.85rem;
    color: var(--ncd-text-light);
    margin: 0;
}

.ncd-upload-tips {
    background: rgba(255,255,255,0.05);
    border-radius: var(--ncd-radius);
    padding: 20px;
    margin: 24px 0;
}

.ncd-upload-tips h4 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.ncd-upload-tips ul {
    margin: 0;
    padding-left: 20px;
}

.ncd-upload-tips li {
    color: var(--ncd-text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.ncd-upload-tips li:last-child {
    margin-bottom: 0;
}

/* Photo Uploader Component */
.ncd-photo-uploader {
    position: relative;
    width: 100%;
    min-height: 280px;
    background: rgba(255,255,255,0.03);
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: var(--ncd-radius-lg);
    cursor: pointer;
    transition: all var(--ncd-transition);
    overflow: hidden;
}

.ncd-photo-uploader:hover {
    border-color: var(--ncd-primary);
    background: rgba(74, 144, 164, 0.05);
}

.ncd-photo-uploader.drag-over {
    border-color: var(--ncd-secondary);
    background: rgba(72, 169, 166, 0.1);
}

.ncd-photo-uploader.has-preview {
    border-style: solid;
}

.ncd-upload-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--ncd-text-light);
}

.ncd-upload-content svg {
    opacity: 0.5;
}

.ncd-upload-content p {
    margin: 0;
    font-size: 1.1rem;
}

.ncd-upload-content span {
    font-size: 0.85rem;
    opacity: 0.7;
}

.ncd-upload-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--ncd-primary);
    border-radius: 50%;
    animation: ncdSpin 0.8s linear infinite;
}

.ncd-photo-preview {
    position: absolute;
    inset: 0;
}

.ncd-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ncd-photo-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all var(--ncd-transition);
}

.ncd-photo-remove:hover {
    background: #ff6b6b;
}

/* Preview Step Carousel */
.ncd-preview-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.ncd-render-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.ncd-carousel-nav {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--ncd-border);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all var(--ncd-transition);
}

.ncd-carousel-nav:hover:not(:disabled) {
    background: var(--ncd-primary);
    border-color: var(--ncd-primary);
}

.ncd-carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ncd-carousel-dots {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.ncd-carousel-dot {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    transition: all var(--ncd-transition);
}

.ncd-carousel-dot.active {
    background: var(--ncd-primary);
    transform: scale(1.3);
}

.ncd-carousel-dot:hover:not(.active) {
    background: rgba(255,255,255,0.5);
}

.ncd-placeholder-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.7);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--ncd-text-light);
}

/* Render Actions */
.ncd-render-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* Thumbnail Grid */
.ncd-render-thumbnails {
    margin-top: 48px;
    text-align: center;
}

.ncd-render-thumbnails h4 {
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--ncd-text-light);
}

.ncd-thumbnails-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ncd-thumbnail-card {
    position: relative;
    width: 80px;
    height: 60px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--ncd-transition);
    background: rgba(0,0,0,0.3);
}

.ncd-thumbnail-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ncd-thumbnail-card:hover {
    border-color: rgba(255,255,255,0.3);
}

.ncd-thumbnail-card.active {
    border-color: var(--ncd-primary);
    transform: scale(1.1);
}

.ncd-thumbnail-number {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 600;
}

/* Generating Animation */
.ncd-generating-animation {
    animation: ncdPulse 1.5s ease infinite;
}

.ncd-generating-animation svg {
    color: var(--ncd-accent);
}

/* Mood Board Sections */
.ncd-moodboard-section {
    margin-bottom: 24px;
}

.ncd-moodboard-section h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ncd-text-light);
    margin-bottom: 12px;
}

.ncd-material-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.ncd-material-tag {
    padding: 6px 14px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 0.85rem;
}

.ncd-moodboard-description {
    font-style: italic;
    color: var(--ncd-text-light);
    text-align: center;
    margin-top: 16px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .ncd-carousel-nav {
        width: 36px;
        height: 36px;
    }
    
    .ncd-thumbnail-card {
        width: 60px;
        height: 45px;
    }
    
    .ncd-render-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .ncd-render-actions .ncd-btn {
        flex: 1;
        min-width: 120px;
    }
}

/* ============================================================================
 * v2.8.0 - WOOCOMMERCE CHECKOUT INTEGRATION
 * ============================================================================ */

.ncd-package-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Legacy buy-btn styles removed in v2.8.2 - replaced by .ncd-btn-checkout */

@keyframes ncd-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.5; }
}

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

@keyframes ncd-fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
 * v2.8.1 - DISCOVER CACHING STYLES
 * ========================================================================= */

.ncd-discover-cached {
    text-align: center;
    padding: 40px 20px;
    max-width: 480px;
    margin: 0 auto;
}

.ncd-cached-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A90A4 0%, #48A9A6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: #fff;
    animation: ncd-fadeIn 0.5s ease;
}

.ncd-cached-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 24px;
}

.ncd-cached-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ncd-cached-number {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Playfair Display', serif;
}

.ncd-cached-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.ncd-cached-message {
    color: rgba(255,255,255,0.7);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* =========================================================================
 * v2.8.2 - UNIFIED CHECKOUT FLOW STYLES
 * ========================================================================= */

.ncd-package-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ncd-package-wrapper.ncd-package-selected {
    transform: scale(1.03);
}

.ncd-package-wrapper.ncd-package-selected .ncd-package-card {
    border-color: #4A90A4;
    box-shadow: 0 0 0 2px #4A90A4, 0 8px 32px rgba(74, 144, 164, 0.35);
}

.ncd-package-wrapper.ncd-package-processing {
    pointer-events: none;
}

.ncd-package-wrapper.ncd-package-processing .ncd-package-card {
    border-color: #4A90A4;
    animation: ncd-pulse 1.5s ease infinite;
}

/* Unified checkout button inside package card */
.ncd-btn-checkout {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #1A5F7A 0%, #4A90A4 100%);
    color: #fff;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-transform: none;
    margin-top: auto;
}

.ncd-btn-checkout .ncd-btn-label {
    font-weight: 700;
}

.ncd-btn-checkout .ncd-btn-price {
    font-weight: 600;
    opacity: 0.9;
}

.ncd-btn-checkout:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(26, 95, 122, 0.45);
    border-color: rgba(255,255,255,0.15);
}

.ncd-btn-checkout:active:not(:disabled) {
    transform: translateY(0);
}

.ncd-btn-checkout.ncd-btn-loading {
    opacity: 0.85;
    cursor: wait;
    animation: ncd-pulse 1.5s ease infinite;
}

.ncd-btn-checkout:disabled:not(.ncd-btn-loading) {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.ncd-btn-checkout .ncd-btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ncd-spin 0.6s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* Featured package button gets shimmer */
.ncd-package-card.featured .ncd-btn-checkout,
.ncd-package-card.selected .ncd-btn-checkout {
    background: linear-gradient(135deg, #1A5F7A 0%, #48A9A6 100%);
}

/* Package card states */
.ncd-package-card.processing {
    opacity: 0.9;
}

.ncd-package-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.ncd-package-card.selected {
    border-color: #4A90A4;
}

/* Checkout status bar */
.ncd-checkout-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(74, 144, 164, 0.15);
    border: 1px solid rgba(74, 144, 164, 0.3);
    border-radius: 12px;
    margin-bottom: 24px;
    color: #fff;
    font-weight: 500;
    animation: ncd-fadeIn 0.3s ease;
}

.ncd-checkout-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #4A90A4;
    border-radius: 50%;
    animation: ncd-spin 0.8s linear infinite;
}

/* Checkout error bar */
.ncd-checkout-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.35);
    border-radius: 12px;
    margin-bottom: 24px;
    color: #ff8a8a;
    font-weight: 500;
    font-size: 0.95rem;
    animation: ncd-fadeIn 0.3s ease;
}

.ncd-checkout-error svg {
    flex-shrink: 0;
    color: #ff6b6b;
}

/* =========================================================================
 * v2.9.0 ADDITIONS
 * ========================================================================= */

/* Full-screen Lightbox Overlay */
.ncd-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ncd-fadeIn 0.25s ease;
    cursor: zoom-out;
    outline: none;
}

.ncd-lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ncd-lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
    animation: ncd-scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}

@keyframes ncd-scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ncd-lightbox-close {
    position: absolute;
    top: -40px;
    right: -10px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.ncd-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.ncd-lightbox-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 90vw;
    padding: 12px 4px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
}

/* Image Loading Shimmer */
.ncd-image-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        rgba(74, 144, 164, 0.08) 0%,
        rgba(74, 144, 164, 0.18) 50%,
        rgba(74, 144, 164, 0.08) 100%);
    background-size: 1200px 100%;
    animation: ncd-shimmerLoad 1.5s ease-in-out infinite;
    border-radius: 12px;
    z-index: 1;
}

@keyframes ncd-shimmerLoad {
    0% { background-position: -1200px 0; }
    100% { background-position: 1200px 0; }
}

.ncd-preview-container {
    position: relative;
    overflow: hidden;
}

.ncd-image-loading {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ncd-image-loaded {
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* Preview image hover state */
.ncd-preview-image:hover {
    filter: brightness(1.02);
    transition: filter 0.2s ease;
}

/* Error toast positioning fix for mobile */
.ncd-error-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    max-width: calc(100vw - 40px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .ncd-error-toast {
        bottom: 80px;
        max-width: calc(100vw - 20px);
        white-space: normal;
        text-align: center;
    }
    
    .ncd-lightbox-image {
        max-width: 95vw;
        max-height: 75vh;
    }
    
    .ncd-lightbox-close {
        top: 10px;
        right: 10px;
    }
}

/* Thumbnail loading skeleton */
.ncd-thumbnail-card img {
    transition: opacity 0.3s ease;
    background: linear-gradient(135deg, rgba(74,144,164,0.1) 0%, rgba(72,169,166,0.1) 100%);
}

/* Render carousel smooth transitions */
.ncd-render-carousel {
    transition: all 0.3s ease;
}

/* Welcome step refined animation */
.ncd-step-welcome .ncd-welcome-content {
    animation: ncd-welcomeFloat 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ncd-welcomeFloat {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
