/**
 * Shield Moto 3D – Bike Selector (Frontend)
 * Clean, professional styling that works with any WooCommerce theme.
 *
 * @package ShieldMoto3D
 * @since   1.0.0
 */

/* ── Container ─────────────────────────────────────── */
.sm3d-bike-selector {
    margin: 20px 0;
    padding: 20px;
    border: 2px solid #e63946;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.sm3d-bike-selector.sm3d-hidden {
    display: none;
}

.sm3d-bike-selector.sm3d-reveal {
    display: block;
    animation: sm3dSlideIn 0.4s ease forwards;
}

@keyframes sm3dSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Heading ───────────────────────────────────────── */
.sm3d-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0d9d9;
}

.sm3d-heading-icon {
    font-size: 22px;
    line-height: 1;
}

.sm3d-heading-text {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: 0.02em;
}

.sm3d-required-badge {
    display: inline-block;
    margin-left: auto;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #e63946;
    background: #fdeaec;
    border-radius: 20px;
}

/* ── Fields grid ───────────────────────────────────── */
.sm3d-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

@media (max-width: 600px) {
    .sm3d-fields {
        grid-template-columns: 1fr;
    }
}

.sm3d-field {
    position: relative;
}

.sm3d-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.sm3d-field label abbr.required {
    color: #e63946;
    text-decoration: none;
}

.sm3d-field select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sm3d-field select:focus {
    outline: none;
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}

.sm3d-field select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.sm3d-field select.sm3d-loading {
    background-image: none;
    color: #999;
}

/* ── "Add New" option styling ─────────────────────── */
.sm3d-field select option[value="__add_new__"] {
    color: #e63946;
    font-weight: 600;
    font-style: italic;
}

/* ── "Add New" inline form ────────────────────────── */
.sm3d-add-new-row {
    margin-top: 8px;
    padding: 10px 12px;
    background: #fef9f0;
    border: 1px solid #e5d5b5;
    border-radius: 6px;
    animation: sm3dSlideIn 0.3s ease forwards;
}

.sm3d-add-new-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.sm3d-add-new-input-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.sm3d-add-new-input {
    flex: 1;
    min-width: 120px;
    padding: 7px 10px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s ease;
}

.sm3d-add-new-input:focus {
    border-color: #e63946;
    box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.1);
}

.sm3d-add-new-btn {
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    line-height: 1.3;
}

.sm3d-add-new-confirm {
    background: #e63946;
    color: #fff;
}

.sm3d-add-new-confirm:hover {
    background: #c1121f;
}

.sm3d-add-new-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sm3d-add-new-cancel {
    background: #e0e0e0;
    color: #555;
}

.sm3d-add-new-cancel:hover {
    background: #ccc;
}

.sm3d-add-new-status {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* ── Selected state (all 3 chosen) ─────────────────── */
.sm3d-bike-selector.sm3d-complete {
    border-color: #2d936c;
    background: linear-gradient(135deg, #f0faf5 0%, #ffffff 100%);
}

.sm3d-bike-selector.sm3d-complete .sm3d-heading {
    border-bottom-color: #c8e6d8;
}

.sm3d-bike-selector.sm3d-complete .sm3d-required-badge {
    background: #d4edda;
    color: #2d936c;
}

.sm3d-bike-selector.sm3d-complete .sm3d-required-badge::before {
    content: '✓ ';
}

.sm3d-bike-selector.sm3d-complete .sm3d-field select {
    border-color: #2d936c;
}

/* ── Validation message ────────────────────────────── */
.sm3d-validation-msg {
    margin-top: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #e63946;
    background: #fdeaec;
    border-radius: 6px;
    border-left: 3px solid #e63946;
}

/* ── Loading spinner on select ─────────────────────── */
.sm3d-field select.sm3d-loading {
    pointer-events: none;
    position: relative;
}

/* ── CAD Upload Section ───────────────────────────── */
.sm3d-cad-upload {
    margin: 16px 0 20px;
    padding: 20px;
    border: 2px solid #2196F3;
    border-radius: 8px;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.sm3d-cad-upload.sm3d-hidden {
    display: none;
}

.sm3d-cad-upload.sm3d-reveal {
    display: block;
    animation: sm3dSlideIn 0.4s ease forwards;
}

.sm3d-cad-heading {
    border-bottom-color: #c8ddf0;
}

.sm3d-optional-badge {
    display: inline-block;
    margin-left: auto;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2196F3;
    background: #e3f2fd;
    border-radius: 20px;
}

.sm3d-cad-description {
    margin: 0 0 12px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.sm3d-cad-cost-info {
    margin: 0 0 14px;
    padding: 8px 12px;
    font-size: 13px;
    color: #1a1a2e;
    background: #fff3cd;
    border-radius: 6px;
    border-left: 3px solid #ffc107;
}

.sm3d-cad-cost-info strong {
    color: #e63946;
}

/* ── Dropzone ─────────────────────────────────────── */
.sm3d-cad-dropzone {
    border: 2px dashed #b0bec5;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    position: relative;
}

.sm3d-cad-dropzone:hover,
.sm3d-cad-dropzone.sm3d-cad-dragover {
    border-color: #2196F3;
    background-color: #e3f2fd;
}

.sm3d-cad-dropzone-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.sm3d-cad-dropzone-text {
    margin: 0 0 10px;
    font-size: 14px;
    color: #555;
}

.sm3d-cad-browse-btn {
    display: inline-block;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #2196F3;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sm3d-cad-browse-btn:hover {
    background: #1976D2;
}

.sm3d-cad-filetypes {
    margin: 10px 0 0;
    font-size: 11px;
    color: #999;
}

/* ── File info (shown after upload) ───────────────── */
.sm3d-cad-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.sm3d-cad-file-icon {
    font-size: 28px;
}

.sm3d-cad-file-details {
    flex: 1;
    text-align: left;
}

.sm3d-cad-file-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    word-break: break-all;
}

.sm3d-cad-file-size {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.sm3d-cad-file-actions {
    display: flex;
    gap: 6px;
}

.sm3d-cad-change-btn,
.sm3d-cad-remove-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sm3d-cad-change-btn {
    background: #e3f2fd;
    color: #2196F3;
}

.sm3d-cad-change-btn:hover {
    background: #bbdefb;
}

.sm3d-cad-remove-btn {
    background: #fdeaec;
    color: #e63946;
}

.sm3d-cad-remove-btn:hover {
    background: #f8c9ce;
}

/* ── Progress bar ─────────────────────────────────── */
.sm3d-cad-progress {
    margin-top: 12px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.sm3d-cad-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #1976D2);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0;
}

/* ── Status messages ──────────────────────────────── */
.sm3d-cad-status {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
}

.sm3d-cad-status-success {
    color: #2d936c;
    background: #d4edda;
    border-left: 3px solid #2d936c;
}

.sm3d-cad-status-error {
    color: #e63946;
    background: #fdeaec;
    border-left: 3px solid #e63946;
}

/* ── CAD upload with file state ───────────────────── */
.sm3d-cad-upload.sm3d-cad-has-file {
    border-color: #2d936c;
    background: linear-gradient(135deg, #f0faf5 0%, #ffffff 100%);
}

.sm3d-cad-upload.sm3d-cad-has-file .sm3d-cad-heading {
    border-bottom-color: #c8e6d8;
}

.sm3d-cad-upload.sm3d-cad-has-file .sm3d-optional-badge {
    background: #d4edda;
    color: #2d936c;
}

.sm3d-cad-upload.sm3d-cad-has-file .sm3d-optional-badge::before {
    content: '\2713  ';
}

@media (max-width: 600px) {
    .sm3d-cad-file-info {
        flex-wrap: wrap;
    }
    .sm3d-cad-file-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ── No-Logo Option Section ──────────────────────── */
.sm3d-no-logo-option {
    margin: 16px 0 20px;
    padding: 20px;
    border: 2px solid #ff9800;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.sm3d-no-logo-option.sm3d-hidden {
    display: none;
}

.sm3d-no-logo-option.sm3d-reveal {
    display: block;
    animation: sm3dSlideIn 0.4s ease forwards;
}

.sm3d-no-logo-heading {
    border-bottom-color: #ffe0b2;
}

.sm3d-no-logo-content {
    padding: 4px 0;
}

.sm3d-no-logo-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    padding: 8px 0;
}

.sm3d-no-logo-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff9800;
    cursor: pointer;
}

.sm3d-no-logo-fee-info {
    margin: 8px 0 0;
    padding: 8px 12px;
    font-size: 13px;
    color: #1a1a2e;
    background: #fff3cd;
    border-radius: 6px;
    border-left: 3px solid #ff9800;
}

.sm3d-no-logo-fee-info strong {
    color: #e63946;
}

.sm3d-no-logo-free-info {
    margin: 6px 0 0;
    padding: 8px 12px;
    font-size: 13px;
    color: #2d936c;
    background: #d4edda;
    border-radius: 6px;
    border-left: 3px solid #2d936c;
}

/* ══════════════════════════════════════════════════════
 * DARK MODE
 * Supports:
 *  - OS-level dark mode via prefers-color-scheme
 *  - Theme class-based: .dark, .theme-dark, .dark-mode,
 *    [data-theme="dark"], body with dark background
 * ══════════════════════════════════════════════════════ */

/* Shared dark variables via a mixin-like approach */
@media (prefers-color-scheme: dark) {
    /* ── Bike Selector Container ──────────────────── */
    .sm3d-bike-selector {
        border-color: #b02a37;
        background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3a 100%);
    }

    .sm3d-heading {
        border-bottom-color: #3a2a2e;
    }

    .sm3d-heading-text {
        color: #e8e8f0;
    }

    .sm3d-required-badge {
        color: #ff6b7a;
        background: #3a1a1e;
    }

    /* ── Fields ───────────────────────────────────── */
    .sm3d-field label {
        color: #c8c8d4;
    }

    .sm3d-field select {
        background-color: #1a1a28;
        color: #e0e0e8;
        border-color: #444460;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    }

    .sm3d-field select:focus {
        border-color: #ff6b7a;
        box-shadow: 0 0 0 3px rgba(255, 107, 122, 0.2);
    }

    .sm3d-field select:disabled {
        background-color: #151520;
        color: #666680;
    }

    .sm3d-field select.sm3d-loading {
        color: #666680;
    }

    /* ── "Add New" inline form ────────────────────── */
    .sm3d-add-new-row {
        background: #252535;
        border-color: #444460;
    }

    .sm3d-add-new-label {
        color: #a0a0b0;
    }

    .sm3d-add-new-input {
        background-color: #1a1a28;
        color: #e0e0e8;
        border-color: #444460;
    }

    .sm3d-add-new-input:focus {
        border-color: #ff6b7a;
        box-shadow: 0 0 0 2px rgba(255, 107, 122, 0.15);
    }

    .sm3d-add-new-cancel {
        background: #333348;
        color: #b0b0c0;
    }

    .sm3d-add-new-cancel:hover {
        background: #444460;
    }

    /* ── Complete state ───────────────────────────── */
    .sm3d-bike-selector.sm3d-complete {
        border-color: #28a06a;
        background: linear-gradient(135deg, #1a2e24 0%, #2a2a3a 100%);
    }

    .sm3d-bike-selector.sm3d-complete .sm3d-heading {
        border-bottom-color: #1e3e2e;
    }

    .sm3d-bike-selector.sm3d-complete .sm3d-required-badge {
        background: #1a3a28;
        color: #4cd68e;
    }

    .sm3d-bike-selector.sm3d-complete .sm3d-field select {
        border-color: #28a06a;
    }

    /* ── Validation message ───────────────────────── */
    .sm3d-validation-msg {
        color: #ff6b7a;
        background: #3a1a1e;
        border-left-color: #ff6b7a;
    }

    /* ── No-Logo Option ──────────────────────────── */
    .sm3d-no-logo-option {
        border-color: #e65100;
        background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3a 100%);
    }

    .sm3d-no-logo-heading {
        border-bottom-color: #3a2e1a;
    }

    .sm3d-no-logo-label {
        color: #e0e0e8;
    }

    .sm3d-no-logo-fee-info {
        color: #e0e0e8;
        background: #2e2a1a;
        border-left-color: #ff9800;
    }

    .sm3d-no-logo-fee-info strong {
        color: #ff6b7a;
    }

    .sm3d-no-logo-free-info {
        color: #4cd68e;
        background: #1a3a28;
        border-left-color: #4cd68e;
    }

    /* ── CAD Upload Section ───────────────────────── */
    .sm3d-cad-upload {
        border-color: #1976D2;
        background: linear-gradient(135deg, #1a1e2e 0%, #2a2a3a 100%);
    }

    .sm3d-cad-heading {
        border-bottom-color: #1a2e40;
    }

    .sm3d-optional-badge {
        color: #64b5f6;
        background: #1a2535;
    }

    .sm3d-cad-description {
        color: #a0a0b0;
    }

    .sm3d-cad-cost-info {
        color: #e0e0e8;
        background: #2e2a1a;
        border-left-color: #ffc107;
    }

    .sm3d-cad-cost-info strong {
        color: #ff6b7a;
    }

    /* ── Dropzone ─────────────────────────────────── */
    .sm3d-cad-dropzone {
        border-color: #444460;
        background-color: transparent;
    }

    .sm3d-cad-dropzone:hover,
    .sm3d-cad-dropzone.sm3d-cad-dragover {
        border-color: #64b5f6;
        background-color: #1a2535;
    }

    .sm3d-cad-dropzone-text {
        color: #a0a0b0;
    }

    .sm3d-cad-filetypes {
        color: #666680;
    }

    /* ── File info ────────────────────────────────── */
    .sm3d-cad-file-name {
        color: #e0e0e8;
    }

    .sm3d-cad-file-size {
        color: #888898;
    }

    .sm3d-cad-change-btn {
        background: #1a2535;
        color: #64b5f6;
    }

    .sm3d-cad-change-btn:hover {
        background: #1a3048;
    }

    .sm3d-cad-remove-btn {
        background: #3a1a1e;
        color: #ff6b7a;
    }

    .sm3d-cad-remove-btn:hover {
        background: #4a1a22;
    }

    /* ── Progress bar ────────────────────────────── */
    .sm3d-cad-progress {
        background: #333348;
    }

    /* ── Status messages ─────────────────────────── */
    .sm3d-cad-status-success {
        color: #4cd68e;
        background: #1a3a28;
        border-left-color: #4cd68e;
    }

    .sm3d-cad-status-error {
        color: #ff6b7a;
        background: #3a1a1e;
        border-left-color: #ff6b7a;
    }

    /* ── CAD with file state ─────────────────────── */
    .sm3d-cad-upload.sm3d-cad-has-file {
        border-color: #28a06a;
        background: linear-gradient(135deg, #1a2e24 0%, #2a2a3a 100%);
    }

    .sm3d-cad-upload.sm3d-cad-has-file .sm3d-cad-heading {
        border-bottom-color: #1e3e2e;
    }

    .sm3d-cad-upload.sm3d-cad-has-file .sm3d-optional-badge {
        background: #1a3a28;
        color: #4cd68e;
    }
}

/* ── Class-based dark mode (for themes that toggle via CSS class) ── */
.dark .sm3d-bike-selector,
.theme-dark .sm3d-bike-selector,
.dark-mode .sm3d-bike-selector,
[data-theme="dark"] .sm3d-bike-selector {
    border-color: #b02a37;
    background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3a 100%);
}

.dark .sm3d-heading,
.theme-dark .sm3d-heading,
.dark-mode .sm3d-heading,
[data-theme="dark"] .sm3d-heading {
    border-bottom-color: #3a2a2e;
}

.dark .sm3d-heading-text,
.theme-dark .sm3d-heading-text,
.dark-mode .sm3d-heading-text,
[data-theme="dark"] .sm3d-heading-text {
    color: #e8e8f0;
}

.dark .sm3d-required-badge,
.theme-dark .sm3d-required-badge,
.dark-mode .sm3d-required-badge,
[data-theme="dark"] .sm3d-required-badge {
    color: #ff6b7a;
    background: #3a1a1e;
}

.dark .sm3d-field label,
.theme-dark .sm3d-field label,
.dark-mode .sm3d-field label,
[data-theme="dark"] .sm3d-field label {
    color: #c8c8d4;
}

.dark .sm3d-field select,
.theme-dark .sm3d-field select,
.dark-mode .sm3d-field select,
[data-theme="dark"] .sm3d-field select {
    background-color: #1a1a28;
    color: #e0e0e8;
    border-color: #444460;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
}

.dark .sm3d-field select:focus,
.theme-dark .sm3d-field select:focus,
.dark-mode .sm3d-field select:focus,
[data-theme="dark"] .sm3d-field select:focus {
    border-color: #ff6b7a;
    box-shadow: 0 0 0 3px rgba(255, 107, 122, 0.2);
}

.dark .sm3d-field select:disabled,
.theme-dark .sm3d-field select:disabled,
.dark-mode .sm3d-field select:disabled,
[data-theme="dark"] .sm3d-field select:disabled {
    background-color: #151520;
    color: #666680;
}

.dark .sm3d-add-new-row,
.theme-dark .sm3d-add-new-row,
.dark-mode .sm3d-add-new-row,
[data-theme="dark"] .sm3d-add-new-row {
    background: #252535;
    border-color: #444460;
}

.dark .sm3d-add-new-label,
.theme-dark .sm3d-add-new-label,
.dark-mode .sm3d-add-new-label,
[data-theme="dark"] .sm3d-add-new-label {
    color: #a0a0b0;
}

.dark .sm3d-add-new-input,
.theme-dark .sm3d-add-new-input,
.dark-mode .sm3d-add-new-input,
[data-theme="dark"] .sm3d-add-new-input {
    background-color: #1a1a28;
    color: #e0e0e8;
    border-color: #444460;
}

.dark .sm3d-add-new-cancel,
.theme-dark .sm3d-add-new-cancel,
.dark-mode .sm3d-add-new-cancel,
[data-theme="dark"] .sm3d-add-new-cancel {
    background: #333348;
    color: #b0b0c0;
}

.dark .sm3d-bike-selector.sm3d-complete,
.theme-dark .sm3d-bike-selector.sm3d-complete,
.dark-mode .sm3d-bike-selector.sm3d-complete,
[data-theme="dark"] .sm3d-bike-selector.sm3d-complete {
    border-color: #28a06a;
    background: linear-gradient(135deg, #1a2e24 0%, #2a2a3a 100%);
}

.dark .sm3d-bike-selector.sm3d-complete .sm3d-required-badge,
.theme-dark .sm3d-bike-selector.sm3d-complete .sm3d-required-badge,
.dark-mode .sm3d-bike-selector.sm3d-complete .sm3d-required-badge,
[data-theme="dark"] .sm3d-bike-selector.sm3d-complete .sm3d-required-badge {
    background: #1a3a28;
    color: #4cd68e;
}

.dark .sm3d-bike-selector.sm3d-complete .sm3d-field select,
.theme-dark .sm3d-bike-selector.sm3d-complete .sm3d-field select,
.dark-mode .sm3d-bike-selector.sm3d-complete .sm3d-field select,
[data-theme="dark"] .sm3d-bike-selector.sm3d-complete .sm3d-field select {
    border-color: #28a06a;
}

.dark .sm3d-validation-msg,
.theme-dark .sm3d-validation-msg,
.dark-mode .sm3d-validation-msg,
[data-theme="dark"] .sm3d-validation-msg {
    color: #ff6b7a;
    background: #3a1a1e;
    border-left-color: #ff6b7a;
}

/* ── CAD Upload Dark Mode (class-based) ──────────── */
.dark .sm3d-cad-upload,
.theme-dark .sm3d-cad-upload,
.dark-mode .sm3d-cad-upload,
[data-theme="dark"] .sm3d-cad-upload {
    border-color: #1976D2;
    background: linear-gradient(135deg, #1a1e2e 0%, #2a2a3a 100%);
}

.dark .sm3d-cad-heading,
.theme-dark .sm3d-cad-heading,
.dark-mode .sm3d-cad-heading,
[data-theme="dark"] .sm3d-cad-heading {
    border-bottom-color: #1a2e40;
}

.dark .sm3d-optional-badge,
.theme-dark .sm3d-optional-badge,
.dark-mode .sm3d-optional-badge,
[data-theme="dark"] .sm3d-optional-badge {
    color: #64b5f6;
    background: #1a2535;
}

.dark .sm3d-cad-description,
.theme-dark .sm3d-cad-description,
.dark-mode .sm3d-cad-description,
[data-theme="dark"] .sm3d-cad-description {
    color: #a0a0b0;
}

.dark .sm3d-cad-cost-info,
.theme-dark .sm3d-cad-cost-info,
.dark-mode .sm3d-cad-cost-info,
[data-theme="dark"] .sm3d-cad-cost-info {
    color: #e0e0e8;
    background: #2e2a1a;
}

.dark .sm3d-cad-dropzone,
.theme-dark .sm3d-cad-dropzone,
.dark-mode .sm3d-cad-dropzone,
[data-theme="dark"] .sm3d-cad-dropzone {
    border-color: #444460;
}

.dark .sm3d-cad-dropzone:hover,
.theme-dark .sm3d-cad-dropzone:hover,
.dark-mode .sm3d-cad-dropzone:hover,
[data-theme="dark"] .sm3d-cad-dropzone:hover,
.dark .sm3d-cad-dropzone.sm3d-cad-dragover,
.theme-dark .sm3d-cad-dropzone.sm3d-cad-dragover,
.dark-mode .sm3d-cad-dropzone.sm3d-cad-dragover,
[data-theme="dark"] .sm3d-cad-dropzone.sm3d-cad-dragover {
    border-color: #64b5f6;
    background-color: #1a2535;
}

.dark .sm3d-cad-dropzone-text,
.theme-dark .sm3d-cad-dropzone-text,
.dark-mode .sm3d-cad-dropzone-text,
[data-theme="dark"] .sm3d-cad-dropzone-text {
    color: #a0a0b0;
}

.dark .sm3d-cad-filetypes,
.theme-dark .sm3d-cad-filetypes,
.dark-mode .sm3d-cad-filetypes,
[data-theme="dark"] .sm3d-cad-filetypes {
    color: #666680;
}

.dark .sm3d-cad-file-name,
.theme-dark .sm3d-cad-file-name,
.dark-mode .sm3d-cad-file-name,
[data-theme="dark"] .sm3d-cad-file-name {
    color: #e0e0e8;
}

.dark .sm3d-cad-file-size,
.theme-dark .sm3d-cad-file-size,
.dark-mode .sm3d-cad-file-size,
[data-theme="dark"] .sm3d-cad-file-size {
    color: #888898;
}

.dark .sm3d-cad-change-btn,
.theme-dark .sm3d-cad-change-btn,
.dark-mode .sm3d-cad-change-btn,
[data-theme="dark"] .sm3d-cad-change-btn {
    background: #1a2535;
    color: #64b5f6;
}

.dark .sm3d-cad-remove-btn,
.theme-dark .sm3d-cad-remove-btn,
.dark-mode .sm3d-cad-remove-btn,
[data-theme="dark"] .sm3d-cad-remove-btn {
    background: #3a1a1e;
    color: #ff6b7a;
}

.dark .sm3d-cad-progress,
.theme-dark .sm3d-cad-progress,
.dark-mode .sm3d-cad-progress,
[data-theme="dark"] .sm3d-cad-progress {
    background: #333348;
}

.dark .sm3d-cad-status-success,
.theme-dark .sm3d-cad-status-success,
.dark-mode .sm3d-cad-status-success,
[data-theme="dark"] .sm3d-cad-status-success {
    color: #4cd68e;
    background: #1a3a28;
    border-left-color: #4cd68e;
}

.dark .sm3d-cad-status-error,
.theme-dark .sm3d-cad-status-error,
.dark-mode .sm3d-cad-status-error,
[data-theme="dark"] .sm3d-cad-status-error {
    color: #ff6b7a;
    background: #3a1a1e;
    border-left-color: #ff6b7a;
}

.dark .sm3d-cad-upload.sm3d-cad-has-file,
.theme-dark .sm3d-cad-upload.sm3d-cad-has-file,
.dark-mode .sm3d-cad-upload.sm3d-cad-has-file,
[data-theme="dark"] .sm3d-cad-upload.sm3d-cad-has-file {
    border-color: #28a06a;
    background: linear-gradient(135deg, #1a2e24 0%, #2a2a3a 100%);
}

.dark .sm3d-cad-upload.sm3d-cad-has-file .sm3d-optional-badge,
.theme-dark .sm3d-cad-upload.sm3d-cad-has-file .sm3d-optional-badge,
.dark-mode .sm3d-cad-upload.sm3d-cad-has-file .sm3d-optional-badge,
[data-theme="dark"] .sm3d-cad-upload.sm3d-cad-has-file .sm3d-optional-badge {
    background: #1a3a28;
    color: #4cd68e;
}

/* ── No-Logo Dark Mode (class-based) ────────────── */
.dark .sm3d-no-logo-option,
.theme-dark .sm3d-no-logo-option,
.dark-mode .sm3d-no-logo-option,
[data-theme="dark"] .sm3d-no-logo-option {
    border-color: #e65100;
    background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3a 100%);
}

.dark .sm3d-no-logo-heading,
.theme-dark .sm3d-no-logo-heading,
.dark-mode .sm3d-no-logo-heading,
[data-theme="dark"] .sm3d-no-logo-heading {
    border-bottom-color: #3a2e1a;
}

.dark .sm3d-no-logo-label,
.theme-dark .sm3d-no-logo-label,
.dark-mode .sm3d-no-logo-label,
[data-theme="dark"] .sm3d-no-logo-label {
    color: #e0e0e8;
}

.dark .sm3d-no-logo-fee-info,
.theme-dark .sm3d-no-logo-fee-info,
.dark-mode .sm3d-no-logo-fee-info,
[data-theme="dark"] .sm3d-no-logo-fee-info {
    color: #e0e0e8;
    background: #2e2a1a;
    border-left-color: #ff9800;
}

.dark .sm3d-no-logo-free-info,
.theme-dark .sm3d-no-logo-free-info,
.dark-mode .sm3d-no-logo-free-info,
[data-theme="dark"] .sm3d-no-logo-free-info {
    color: #4cd68e;
    background: #1a3a28;
    border-left-color: #4cd68e;
}

/* ══════════════════════════════════════════════════════
 * ADMIN-FORCED DARK MODE (via Settings page)
 * The .sm3d-force-dark class forces dark theme regardless of OS setting.
 * ══════════════════════════════════════════════════════ */
.sm3d-force-dark .sm3d-bike-selector { border-color: #b02a37; background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3a 100%); }
.sm3d-force-dark .sm3d-heading { border-bottom-color: #3a2a2e; }
.sm3d-force-dark .sm3d-heading-text { color: #e8e8f0; }
.sm3d-force-dark .sm3d-required-badge { color: #ff6b7a; background: #3a1a1e; }
.sm3d-force-dark .sm3d-field label { color: #c8c8d4; }
.sm3d-force-dark .sm3d-field select { background-color: #1a1a28; color: #e0e0e8; border-color: #444460; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E"); }
.sm3d-force-dark .sm3d-field select:focus { border-color: #ff6b7a; box-shadow: 0 0 0 3px rgba(255, 107, 122, 0.2); }
.sm3d-force-dark .sm3d-field select:disabled { background-color: #151520; color: #666680; }
.sm3d-force-dark .sm3d-add-new-row { background: #252535; border-color: #444460; }
.sm3d-force-dark .sm3d-add-new-label { color: #a0a0b0; }
.sm3d-force-dark .sm3d-add-new-input { background-color: #1a1a28; color: #e0e0e8; border-color: #444460; }
.sm3d-force-dark .sm3d-add-new-cancel { background: #333348; color: #b0b0c0; }
.sm3d-force-dark .sm3d-bike-selector.sm3d-complete { border-color: #28a06a; background: linear-gradient(135deg, #1a2e24 0%, #2a2a3a 100%); }
.sm3d-force-dark .sm3d-bike-selector.sm3d-complete .sm3d-required-badge { background: #1a3a28; color: #4cd68e; }
.sm3d-force-dark .sm3d-bike-selector.sm3d-complete .sm3d-field select { border-color: #28a06a; }
.sm3d-force-dark .sm3d-validation-msg { color: #ff6b7a; background: #3a1a1e; border-left-color: #ff6b7a; }
.sm3d-force-dark .sm3d-cad-upload { border-color: #1976D2; background: linear-gradient(135deg, #1a1e2e 0%, #2a2a3a 100%); }
.sm3d-force-dark .sm3d-cad-heading { border-bottom-color: #1a2e40; }
.sm3d-force-dark .sm3d-optional-badge { color: #64b5f6; background: #1a2535; }
.sm3d-force-dark .sm3d-cad-description { color: #a0a0b0; }
.sm3d-force-dark .sm3d-cad-cost-info { color: #e0e0e8; background: #2e2a1a; }
.sm3d-force-dark .sm3d-cad-dropzone { border-color: #444460; }
.sm3d-force-dark .sm3d-cad-dropzone:hover,
.sm3d-force-dark .sm3d-cad-dropzone.sm3d-cad-dragover { border-color: #64b5f6; background-color: #1a2535; }
.sm3d-force-dark .sm3d-cad-dropzone-text { color: #a0a0b0; }
.sm3d-force-dark .sm3d-cad-filetypes { color: #666680; }
.sm3d-force-dark .sm3d-cad-file-name { color: #e0e0e8; }
.sm3d-force-dark .sm3d-cad-file-size { color: #888898; }
.sm3d-force-dark .sm3d-cad-change-btn { background: #1a2535; color: #64b5f6; }
.sm3d-force-dark .sm3d-cad-remove-btn { background: #3a1a1e; color: #ff6b7a; }
.sm3d-force-dark .sm3d-cad-progress { background: #333348; }
.sm3d-force-dark .sm3d-cad-status-success { color: #4cd68e; background: #1a3a28; border-left-color: #4cd68e; }
.sm3d-force-dark .sm3d-cad-status-error { color: #ff6b7a; background: #3a1a1e; border-left-color: #ff6b7a; }
.sm3d-force-dark .sm3d-cad-upload.sm3d-cad-has-file { border-color: #28a06a; background: linear-gradient(135deg, #1a2e24 0%, #2a2a3a 100%); }
.sm3d-force-dark .sm3d-cad-upload.sm3d-cad-has-file .sm3d-optional-badge { background: #1a3a28; color: #4cd68e; }
.sm3d-force-dark .sm3d-no-logo-option { border-color: #e65100; background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3a 100%); }
.sm3d-force-dark .sm3d-no-logo-heading { border-bottom-color: #3a2e1a; }
.sm3d-force-dark .sm3d-no-logo-label { color: #e0e0e8; }
.sm3d-force-dark .sm3d-no-logo-fee-info { color: #e0e0e8; background: #2e2a1a; border-left-color: #ff9800; }
.sm3d-force-dark .sm3d-no-logo-free-info { color: #4cd68e; background: #1a3a28; border-left-color: #4cd68e; }

/* ══════════════════════════════════════════════════════
 * ADMIN-FORCED LIGHT MODE
 * Overrides prefers-color-scheme: dark when admin forces light theme.
 * ══════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
    .sm3d-force-light .sm3d-bike-selector { border-color: #e63946; background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%); }
    .sm3d-force-light .sm3d-heading { border-bottom-color: #f0d9d9; }
    .sm3d-force-light .sm3d-heading-text { color: #1a1a2e; }
    .sm3d-force-light .sm3d-required-badge { color: #e63946; background: #fdeaec; }
    .sm3d-force-light .sm3d-field label { color: #333; }
    .sm3d-force-light .sm3d-field select { background-color: #fff; color: #333; border-color: #ccc; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E"); }
    .sm3d-force-light .sm3d-field select:focus { border-color: #e63946; box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12); }
    .sm3d-force-light .sm3d-field select:disabled { background-color: #f5f5f5; color: #999; }
    .sm3d-force-light .sm3d-add-new-row { background: #fef9f0; border-color: #e5d5b5; }
    .sm3d-force-light .sm3d-add-new-label { color: #555; }
    .sm3d-force-light .sm3d-add-new-input { background-color: #fff; color: #333; border-color: #ccc; }
    .sm3d-force-light .sm3d-add-new-cancel { background: #e0e0e0; color: #555; }
    .sm3d-force-light .sm3d-bike-selector.sm3d-complete { border-color: #2d936c; background: linear-gradient(135deg, #f0faf5 0%, #ffffff 100%); }
    .sm3d-force-light .sm3d-bike-selector.sm3d-complete .sm3d-required-badge { background: #d4edda; color: #2d936c; }
    .sm3d-force-light .sm3d-bike-selector.sm3d-complete .sm3d-field select { border-color: #2d936c; }
    .sm3d-force-light .sm3d-validation-msg { color: #e63946; background: #fdeaec; border-left-color: #e63946; }
    .sm3d-force-light .sm3d-cad-upload { border-color: #2196F3; background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%); }
    .sm3d-force-light .sm3d-cad-heading { border-bottom-color: #c8ddf0; }
    .sm3d-force-light .sm3d-optional-badge { color: #2196F3; background: #e3f2fd; }
    .sm3d-force-light .sm3d-cad-description { color: #555; }
    .sm3d-force-light .sm3d-cad-cost-info { color: #1a1a2e; background: #fff3cd; }
    .sm3d-force-light .sm3d-cad-dropzone { border-color: #b0bec5; background-color: transparent; }
    .sm3d-force-light .sm3d-cad-dropzone:hover,
    .sm3d-force-light .sm3d-cad-dropzone.sm3d-cad-dragover { border-color: #2196F3; background-color: #e3f2fd; }
    .sm3d-force-light .sm3d-cad-dropzone-text { color: #555; }
    .sm3d-force-light .sm3d-cad-filetypes { color: #999; }
    .sm3d-force-light .sm3d-cad-file-name { color: #1a1a2e; }
    .sm3d-force-light .sm3d-cad-file-size { color: #888; }
    .sm3d-force-light .sm3d-cad-change-btn { background: #e3f2fd; color: #2196F3; }
    .sm3d-force-light .sm3d-cad-remove-btn { background: #fdeaec; color: #e63946; }
    .sm3d-force-light .sm3d-cad-progress { background: #e0e0e0; }
    .sm3d-force-light .sm3d-cad-status-success { color: #2d936c; background: #d4edda; border-left-color: #2d936c; }
    .sm3d-force-light .sm3d-cad-status-error { color: #e63946; background: #fdeaec; border-left-color: #e63946; }
    .sm3d-force-light .sm3d-cad-upload.sm3d-cad-has-file { border-color: #2d936c; background: linear-gradient(135deg, #f0faf5 0%, #ffffff 100%); }
    .sm3d-force-light .sm3d-cad-upload.sm3d-cad-has-file .sm3d-optional-badge { background: #d4edda; color: #2d936c; }
    .sm3d-force-light .sm3d-no-logo-option { border-color: #ff9800; background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%); }
    .sm3d-force-light .sm3d-no-logo-heading { border-bottom-color: #ffe0b2; }
    .sm3d-force-light .sm3d-no-logo-label { color: #333; }
    .sm3d-force-light .sm3d-no-logo-fee-info { color: #1a1a2e; background: #fff3cd; border-left-color: #ff9800; }
    .sm3d-force-light .sm3d-no-logo-free-info { color: #2d936c; background: #d4edda; border-left-color: #2d936c; }
}
