.wsd-dna-widget-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    font-family: inherit;
}

.wsd-dna-widget {
    background-color: #FFFCF9; /* Default Ivory, overridden by controls */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    color: #333333;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.wsd-step-container {
    padding: 60px 40px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
}

.wsd-step-container.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    position: relative;
}

/* Typography */
.wsd-heading {
    font-family: 'Playfair Display', serif; /* Fallback if Elementor typography not set */
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.2;
}

.wsd-step-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 40px;
    text-align: center;
}

.wsd-text {
    font-size: 1.1rem;
    max-width: 600px;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.6;
    color: #555;
}

/* Button */
.wsd-dna-btn {
    background-color: #D4AF37;
    color: #fff;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.wsd-dna-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.wsd-time-est {
    font-size: 0.9rem;
    color: #888;
    margin-top: 15px;
}

/* Progress Indicator */
.wsd-progress-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    flex-wrap: wrap;
    gap: 10px;
}

.wsd-step-indicator {
    display: flex;
    align-items: center;
}

.wsd-step-indicator span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
    padding: 5px 0;
    margin: 0 10px;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.wsd-step-indicator span.active {
    color: #D4AF37;
    border-bottom: 1px solid #D4AF37;
    font-weight: 600;
}

.wsd-step-indicator i {
    color: #ddd;
    font-size: 0.5rem;
}

/* Cards Grid */
.wsd-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
}

.wsd-cards-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.wsd-cards-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.wsd-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/5;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
}

.wsd-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.wsd-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 3s ease;
}

.wsd-card:hover img {
    transform: scale(1.05);
}

.wsd-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.wsd-card-label {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
}

.wsd-card.selected {
    border-color: #D4AF37;
    box-shadow: 0 0 0 2px #D4AF37;
}

.wsd-card.selected::after {
    content: '✓';
    font-family: Arial, sans-serif;
    position: absolute;
    top: 15px;
    right: 15px;
    background: #D4AF37;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

/* Palette selection */
.wsd-palettes-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 600px;
}

.wsd-palette-option {
    display: flex;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.wsd-palette-option:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.wsd-palette-option.selected {
    border-color: #D4AF37;
}

.wsd-color-block {
    flex: 1;
    transition: flex 0.3s ease;
}

.wsd-palette-option:hover .wsd-color-block:hover {
    flex: 1.2;
}

.wsd-palette-names {
    display: none;
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

.wsd-palette-option.selected + .wsd-palette-names {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* VS Options (Detail Test) */
.wsd-vs-container {
    display: flex;
    width: 100%;
    max-width: 800px;
    gap: 20px;
    align-items: stretch;
}

.wsd-vs-option {
    flex: 1;
    aspect-ratio: 1;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.wsd-vs-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wsd-vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: #999;
}

.wsd-vs-option.selected {
    border-color: #D4AF37;
    transform: scale(1.05);
    z-index: 1;
}

.wsd-vs-option.not-selected {
    opacity: 0.5;
    filter: grayscale(50%);
}

/* Text list options */
.wsd-text-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 600px;
}

.wsd-text-option {
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.wsd-text-option:hover {
    background: #fafafa;
    border-color: #ddd;
}

.wsd-text-option.selected {
    background: #FDF9EE; /* light gold */
    border-color: #D4AF37;
    color: #D4AF37;
    font-weight: 500;
}

/* Action Bar */
.wsd-action-bar {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.wsd-btn-next {
    background-color: #333;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.wsd-btn-next.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.wsd-btn-next:hover {
    background-color: #000;
}

/* Analysing Screen */
.wsd-analysing-msgs {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #D4AF37;
    font-style: italic;
}

.wsd-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 30px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-top-color: #D4AF37;
    border-radius: 50%;
    animation: wsd-spin 1s linear infinite;
}

@keyframes wsd-spin { 100% { transform: rotate(360deg); } }

/* Final Result Card */
.wsd-result-card {
    background: #fff;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 800px;
    text-align: center;
}

.wsd-result-subtitle {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 10px;
}

.wsd-result-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.1;
}

.wsd-traits-tags {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.wsd-traits-tags span {
    background: #F9F5F0;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
    letter-spacing: 1px;
}

.wsd-dna-chart {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin: 30px auto 10px;
    max-width: 400px;
}

.wsd-dna-segment {
    height: 100%;
    transition: width 1s ease-out;
}

.wsd-dna-legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 40px;
}

.wsd-result-section {
    margin-bottom: 40px;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.wsd-result-section h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.wsd-final-palette {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.wsd-swatch {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    cursor: pointer;
}

.wsd-swatch:hover::after {
    content: attr(data-hex);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
}

.wsd-avoid-list {
    color: #d9534f;
    font-size: 0.95rem;
    padding-left: 20px;
}

.wsd-avoid-list li {
    margin-bottom: 8px;
}

.wsd-actions-final {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
}

.wsd-btn-secondary {
    background: transparent;
    border: 1px solid #ccc;
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.wsd-btn-secondary:hover {
    border-color: #333;
    background: #f9f9f9;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .wsd-step-container { padding: 40px 20px; }
    .wsd-heading { font-size: 2.2rem; }
    .wsd-step-title { font-size: 1.8rem; }
    .wsd-cards-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
    .wsd-vs-container { flex-direction: column; }
    .wsd-vs-divider { margin: 10px 0; }
    .wsd-result-card { padding: 30px 20px; }
    .wsd-result-title { font-size: 2.5rem; }
    .wsd-actions-final { flex-direction: column; }
    .wsd-step-indicator span { display: none; } /* Hide text on mobile for nav */
    .wsd-step-indicator span.active { display: block; }
}
