/* ─── SD-Wunschdesign Frontend ──────────────────── */

/* CTA Button Shortcode */
.sd-wd-cta-wrap {
    margin: 15px 0;
    display: flex;
}

.sd-wd-cta-wrap.sd-wd-cta-align-left {
    justify-content: flex-start;
}

.sd-wd-cta-wrap.sd-wd-cta-align-center {
    justify-content: center;
}

.sd-wd-cta-wrap.sd-wd-cta-align-right {
    justify-content: flex-end;
}

.sd-wd-cta-button {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.4;
}

/* Filled (default) */
.sd-wd-cta-filled {
    background: linear-gradient(135deg, #b8860b, #d4a017);
    color: #fff !important;
    border: 2px solid transparent;
    box-shadow: 0 3px 10px rgba(184, 134, 11, 0.3);
}

.sd-wd-cta-filled:hover {
    background: linear-gradient(135deg, #9a7209, #b8860b);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(184, 134, 11, 0.4);
    color: #fff !important;
}

/* Outline */
.sd-wd-cta-outline {
    background: transparent;
    color: #b8860b !important;
    border: 2px solid #b8860b;
}

.sd-wd-cta-outline:hover {
    background: #b8860b;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(184, 134, 11, 0.3);
}

/* Sizes */
.sd-wd-cta-small {
    padding: 8px 18px;
    font-size: 0.85em;
}

.sd-wd-cta-large {
    padding: 16px 36px;
    font-size: 1.15em;
}

/* ─── Wizard ──────────────────── */

.sd-wd-wizard {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Skip Link — styled as visible secondary button */
.sd-wd-skip-link {
    margin-top: 14px;
}

.sd-wd-skip-link a {
    display: inline-block;
    padding: 10px 22px;
    background: #f0e6d6;
    color: #6b5b3e !important;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid #d4c4a8;
    transition: all 0.25s;
}

.sd-wd-skip-link a:hover {
    background: #b8860b;
    color: #fff !important;
    border-color: #b8860b;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(184, 134, 11, 0.25);
}

/* Steps Indicator */
.sd-wd-steps-indicator {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.sd-wd-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: #e0d5c7;
    color: #8c7b6b;
    transition: all 0.3s;
}

.sd-wd-dot.active {
    background: #b8860b;
    color: #fff;
}

.sd-wd-dot.completed {
    background: #27ae60;
    color: #fff;
}

/* Step Header */
.sd-wd-step-header {
    text-align: center;
    margin-bottom: 30px;
}

.sd-wd-step-header h2 {
    font-size: 1.6em;
    color: #333;
    margin-bottom: 8px;
}

.sd-wd-step-header p {
    color: #666;
    font-size: 1em;
}

/* Options Grid */
.sd-wd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.sd-wd-grid-2 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .sd-wd-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sd-wd-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.sd-wd-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 12px;
    border: 2px solid #e0d5c7;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 0.95em;
    color: #333;
    transition: all 0.25s;
    text-align: center;
}

.sd-wd-option:hover {
    border-color: #b8860b;
    background: #fdf8ef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.15);
}

.sd-wd-option.selected {
    border-color: #b8860b;
    background: #fdf8ef;
    box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.3);
}

/* Results */
.sd-wd-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    min-height: 200px;
}

@media (max-width: 768px) {
    .sd-wd-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

.sd-wd-product-card {
    border: 1px solid #e8e0d6;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.3s, transform 0.3s;
}

.sd-wd-product-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.sd-wd-product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.sd-wd-product-info {
    padding: 12px;
}

.sd-wd-product-info h4 {
    font-size: 0.9em;
    margin: 0 0 6px;
    color: #333;
    line-height: 1.3;
}

.sd-wd-product-price {
    font-weight: 700;
    color: #b8860b;
    font-size: 1em;
}

.sd-wd-product-link {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    background: #b8860b;
    color: #fff !important;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85em;
    transition: background 0.3s;
}

.sd-wd-product-link:hover {
    background: #9a7209;
    color: #fff !important;
}

.sd-wd-results-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sd-wd-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
}

/* Loading */
.sd-wd-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
}

.sd-wd-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0d5c7;
    border-top-color: #b8860b;
    border-radius: 50%;
    animation: sd-wd-spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

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

/* Buttons */
.sd-wd-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    text-align: center;
}

.sd-wd-btn-primary {
    background: #b8860b;
    color: #fff !important;
}

.sd-wd-btn-primary:hover {
    background: #9a7209;
    color: #fff !important;
}

.sd-wd-btn-secondary {
    background: #f0e6d6;
    color: #6b5b3e !important;
}

.sd-wd-btn-secondary:hover {
    background: #e5d6c0;
}

/* Form */
.sd-wd-form-row {
    margin-bottom: 18px;
}

.sd-wd-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 0.95em;
}

.sd-wd-form-row input,
.sd-wd-form-row textarea,
.sd-wd-form-row select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0d5c7;
    border-radius: 6px;
    font-size: 0.95em;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.sd-wd-form-row input:focus,
.sd-wd-form-row textarea:focus {
    border-color: #b8860b;
    outline: none;
}

.sd-wd-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .sd-wd-form-row-half {
        grid-template-columns: 1fr;
    }
}

/* Upload Area */
.sd-wd-upload-area {
    position: relative;
    border: 2px dashed #d0c5b5;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}

.sd-wd-upload-area:hover {
    border-color: #b8860b;
    background: #fdf8ef;
}

.sd-wd-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.sd-wd-upload-icon {
    font-size: 2em;
}

.sd-wd-upload-preview img {
    max-width: 200px;
    border-radius: 6px;
}

/* Info Box */
.sd-wd-form-info {
    background: #fdf8ef;
    border: 1px solid #e8d9b8;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.sd-wd-form-info p {
    margin: 0;
    font-size: 0.9em;
    color: #6b5b3e;
}

.sd-wd-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Confirmation */
.sd-wd-confirmation {
    text-align: center;
    padding: 30px;
}

.sd-wd-confirmation-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.sd-wd-confirmation ol {
    text-align: left;
    display: inline-block;
    margin: 20px 0;
}

.sd-wd-confirmation ol li {
    margin-bottom: 8px;
}

.sd-wd-confirmation .sd-wd-btn {
    margin: 5px 10px;
}

/* ─── My Account Styles ──────────────────── */

.sd-wd-customer-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sd-wd-card-customer {
    background: #fff;
    border: 1px solid #e8e0d6;
    border-radius: 8px;
    padding: 20px;
}

.sd-wd-card-customer h4 {
    margin-top: 0;
    color: #b8860b;
    border-bottom: 2px solid #f0e6d6;
    padding-bottom: 8px;
}

.sd-wd-design-preview img {
    max-width: 100%;
    border-radius: 6px;
    margin-bottom: 15px;
}

.sd-wd-design-actions textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0d5c7;
    border-radius: 6px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.sd-wd-purchase {
    background: #f0faf0 !important;
    border-color: #27ae60 !important;
}

/* ─── Customer Token View: Design Blocks ─── */

.sd-wd-card-muted {
    background: #faf8f5 !important;
    border-color: #e8e0d6 !important;
}

.sd-wd-card-muted .sd-wd-card-label {
    font-size: 0.8em;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 6px;
}

.sd-wd-waiting-info {
    text-align: center;
    padding: 20px 10px;
}

.sd-wd-waiting-icon {
    font-size: 2em;
    display: block;
    margin-bottom: 10px;
}

/* Design block — complete unit with image, message, price */
.sd-wd-design-block {
    padding: 0 !important;
    overflow: hidden;
}

.sd-wd-design-image {
    background: #f5f0ea;
}

.sd-wd-design-image img {
    width: 100%;
    display: block;
    border-radius: 0;
    margin: 0;
}

.sd-wd-design-msg {
    padding: 14px 20px;
    font-size: 1em;
    color: #333;
    line-height: 1.6;
    margin: 12px 0 0;
}

.sd-wd-price-box {
    margin: 10px 0 0;
    padding: 12px 20px;
    background: #f4faf4;
    border: 1px solid #c5dfc5;
    border-radius: 6px;
}

.sd-wd-price-main {
    margin: 0;
    font-size: 1.1em;
    color: #2d7a2d;
    font-weight: 700;
}

.sd-wd-price-note {
    font-weight: 400;
    font-size: 0.85em;
    color: #666;
}

.sd-wd-design-date {
    display: block;
    padding: 8px 20px 0;
    font-size: 0.78em;
    color: #aaa;
    margin: 0;
}

.sd-wd-design-label {
    margin: 0;
    padding: 14px 20px 0;
    font-size: 0.8em;
    color: #b8860b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sd-wd-design-actions {
    padding: 16px 20px 20px;
}

.sd-wd-design-actions textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0d5c7;
    border-radius: 6px;
    box-sizing: border-box;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.sd-wd-design-superseded {
    padding: 10px 20px 16px;
    font-size: 0.85em;
    color: #999;
    font-style: italic;
}

/* Older design slightly faded */
.sd-wd-design-older {
    opacity: 0.7;
}

.sd-wd-design-older:hover {
    opacity: 1;
}

/* Latest design highlight */
.sd-wd-design-latest {
    border-color: #b8860b !important;
    box-shadow: 0 2px 12px rgba(184, 134, 11, 0.12);
}

/* ─── Chat messages (customer view) ─── */

.sd-wd-chat-msg {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.sd-wd-chat-admin {
    background: #fdf8ef;
    border-left: 3px solid #b8860b;
}

.sd-wd-chat-customer {
    background: #f0f4ff;
    border-left: 3px solid #2271b1;
}

.sd-wd-chat-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.82em;
    margin-bottom: 6px;
    color: #888;
}

.sd-wd-chat-msg p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Legacy message styles (keep for backwards compat) */
.sd-wd-msg {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.sd-wd-msg-admin {
    background: #f0e6d6;
}

.sd-wd-msg-customer {
    background: #e8f0fe;
}

.sd-wd-msg-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    margin-bottom: 6px;
    color: #666;
}
