/* =========================================
   1. BASIS & GRID (Meine Einträge)
   ========================================= */

.mmd-dashboard-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
    box-sizing: border-box;
}

.mmd-dashboard-wrapper * {
    box-sizing: border-box;
}

.mmd-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.mmd-dash-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

/* Alerts */
.mmd-alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.mmd-alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.mmd-alert-error {
    background: #fed7d7;
    color: #822727;
    border: 1px solid #feb2b2;
}

/* Grid View (Dashboard Home) */
.mmd-dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.mmd-dash-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.mmd-dash-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mmd-dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.mmd-dash-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.mmd-dash-card-actions {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 10px;
}

/* Status Badges */
.mmd-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.mmd-status-publish {
    background: #c6f6d5;
    color: #22543d;
}

.mmd-status-pending {
    background: #feebc8;
    color: #744210;
}

.mmd-status-draft {
    background: #edf2f7;
    color: #4a5568;
}

.mmd-status-expired {
    background: #fed7d7;
    color: #822727;
}

/* Buttons (scoped to dashboard wrapper to avoid shell conflicts) */
.mmd-dashboard-wrapper .mmd-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.mmd-dashboard-wrapper .mmd-btn-primary {
    background: #3182ce;
    color: #fff;
}

.mmd-dashboard-wrapper .mmd-btn-primary:hover {
    background: #2b6cb0;
}

.mmd-dashboard-wrapper .mmd-btn-secondary,
.mmd-dashboard-wrapper .mmd-btn-outline {
    background: #fff;
    border: 1px solid #cbd5e0;
    color: #4a5568;
}

.mmd-dashboard-wrapper .mmd-btn-secondary:hover,
.mmd-dashboard-wrapper .mmd-btn-outline:hover {
    background: #f7fafc;
    color: #2d3748;
}

.mmd-dashboard-wrapper .mmd-btn-sm {
    padding: 8px 15px;
    font-size: 0.8rem;
}

.mmd-dashboard-wrapper .mmd-btn-disabled {
    background-color: #e5e7eb;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    pointer-events: none;
}


/* =========================================
   2. GLOBAL DASHBOARD FORM
   ========================================= */

.mmd-form-layout {
    display: flex;
    gap: 30px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    min-height: 500px;
    border: 1px solid #e2e8f0;
}

.mmd-form-sidebar {
    width: 250px;
    background: #f8fafc;
    border-right: 1px solid #f1f5f9;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.mmd-form-content-area {
    flex: 1;
    padding: 40px;
    min-width: 0;
    overflow: hidden;
}

/* STEP NAV */
.mmd-step-nav {
    display: flex;
    flex-direction: column;
}

.mmd-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mmd-step-item:hover {
    background: #e2e8f0;
    color: #334155;
}

.mmd-step-item.active {
    background: #fff;
    color: #2563eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.step-icon {
    width: 28px;
    height: 28px;
    background: #e2e8f0;
    color: #64748b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: 0.2s;
}

.mmd-step-item.active .step-icon {
    background: #2563eb;
    color: #fff;
}

.mmd-back-link {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.mmd-back-link a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
}

.mmd-back-link a:hover {
    color: #2563eb;
}

/* STEP CONTENT - !important to prevent Elementor/Theme overrides */
.mmd-step-content {
    display: none !important;
    animation: mmdStepFadeIn 0.3s ease;
}

.mmd-step-content.active {
    display: block !important;
}

@keyframes mmdStepFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mmd-step-content h3 {
    margin-top: 0;
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

/* FORMS */
.mmd-form-group {
    margin-bottom: 25px;
}

.mmd-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
    font-size: 0.95rem;
}

.mmd-form-group input[type="text"],
.mmd-form-group input[type="email"],
.mmd-form-group input[type="url"],
.mmd-form-group input[type="number"],
.mmd-form-group textarea,
.mmd-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: #1e293b;
    transition: 0.2s;
    box-sizing: border-box;
    background: #fff;
    line-height: 1.5;
}

.mmd-form-group input:focus,
.mmd-form-group textarea:focus,
.mmd-form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Input Group (scoped to dashboard wrapper to avoid shell auth form conflicts) */
.mmd-dashboard-wrapper .mmd-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.mmd-dashboard-wrapper .mmd-input-group input {
    flex: 1;
    min-width: 0;
    width: auto;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    z-index: 1;
}

.mmd-dashboard-wrapper .mmd-input-suffix {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e0;
    border-left: none;
    padding: 0 15px;
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    white-space: nowrap;
}

.mmd-step-actions {
    margin-top: 40px;
    border-top: 1px solid #e2e8f0;
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    clear: both;
}

/* =========================================
   3. PLAN GRID DESIGN
   ========================================= */

.mmd-plan-header {
    text-align: center;
    margin-bottom: 40px;
}

.mmd-plan-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: #f8fafc;
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    margin-top: 15px;
}

.mmd-toggle-label {
    font-weight: 600;
    color: #64748b;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
}

.mmd-toggle-label.active {
    color: #1e293b;
}

.mmd-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.mmd-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mmd-toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: .4s;
    border-radius: 34px;
}

.mmd-toggle-switch label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.mmd-toggle-switch input:checked+label {
    background-color: #1e293b;
}

.mmd-toggle-switch input:checked+label:before {
    transform: translateX(20px);
}

.mmd-save-badge {
    background: #d1fae5;
    color: #065f46;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    text-transform: uppercase;
    font-weight: 700;
}

.mmd-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.mmd-plan-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.mmd-plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.mmd-plan-card.active {
    border-color: #1e293b;
    background-color: #f8fafc;
}

.mmd-plan-card.disabled {
    opacity: 0.6;
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    cursor: not-allowed;
    pointer-events: auto;
}

.mmd-plan-card.disabled .mmd-btn-block {
    pointer-events: none;
    background-color: #e5e7eb;
    color: #9ca3af;
    border-color: #e5e7eb;
}

.mmd-plan-card.disabled .mmd-plan-name,
.mmd-plan-card.disabled .mmd-plan-price,
.mmd-plan-card.disabled .mmd-plan-features {
    opacity: 0.5;
}

.mmd-plan-limit-msg {
    font-size: 0.85rem;
    color: #ef4444;
    margin-top: 10px;
    text-align: center;
    line-height: 1.4;
    font-weight: 500;
}

.mmd-plan-limit-msg a {
    color: #2563eb;
    text-decoration: underline;
}

.mmd-plan-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #1e293b;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

.mmd-plan-name {
    font-size: 1.4rem;
    margin: 0 0 15px 0;
    color: #1e293b;
    font-weight: 700;
}

.mmd-plan-price {
    margin-bottom: 25px;
    display: flex;
    align-items: baseline;
}

.mmd-plan-price .amount {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
}

.mmd-plan-price .amount bdi {
    font-style: normal;
}

.mmd-plan-price .period {
    color: #64748b;
    margin-left: 5px;
    font-weight: 500;
    font-size: 0.9rem;
}

.mmd-plan-features {
    flex-grow: 1;
    margin-bottom: 25px;
}

.mmd-plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mmd-plan-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.4;
}

.mmd-plan-features li i {
    color: #1e293b;
    margin-top: 4px;
    font-size: 0.8em;
}

/* FIX: Button Style überschreibt globales Pink */
button.mmd-btn-block,
.mmd-btn-block {
    width: 100%;
    justify-content: center;
    border: 2px solid #000000 !important;
    /* Schwarz erzwingen */
    color: #000000 !important;
    /* Schwarz erzwingen */
    background: transparent !important;
    /* Transparenz erzwingen */
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    /* Wichtig für justify-content */
}

/* Hover-Status */
.mmd-plan-card.active button.mmd-btn-block,
button.mmd-btn-block:hover {
    background: #1e293b !important;
    color: #fff !important;
    border-color: #1e293b !important;
}

/* =========================================
   4. UPLOAD STYLES
   ========================================= */

.mmd-upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    background: #f8fafc;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mmd-upload-area:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.mmd-upload-icon-circle {
    width: 50px;
    height: 50px;
    background: #dbeafe;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin: 0 auto 15px;
}

.mmd-upload-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #1e293b;
    display: block;
}

.mmd-upload-desc {
    font-size: 0.9rem;
    opacity: 0.8;
}

.mmd-upload-preview {
    position: relative;
    width: 100%;
    height: 200px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.mmd-upload-preview img {
    max-width: 100%;
    max-height: 100%;
}

.mmd-remove-img {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.mmd-gallery-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.mmd-gallery-item {
    width: 120px;
    height: 120px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.mmd-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mmd-remove-gallery-item {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.9);
    color: #dc2626;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mmd-remove-gallery-item:hover {
    background: #dc2626;
    color: #fff;
}

.mmd-gallery-upload-btn {
    width: 120px;
    height: 120px;
    min-height: 120px;
    padding: 10px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e0 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    cursor: pointer;
}

.mmd-gallery-upload-btn:hover {
    border-color: #2563eb !important;
    background: #eff6ff !important;
}

.mmd-gallery-upload-btn .mmd-upload-icon {
    font-size: 32px;
    margin-bottom: 5px;
    color: #cbd5e0;
}

.mmd-gallery-upload-btn:hover .mmd-upload-icon {
    color: #2563eb;
}

.mmd-gallery-upload-btn .mmd-upload-text {
    font-size: 0.85rem;
    font-weight: 600;
}


/* =========================================
   5. PROFILE SUCCESS & MATRIX (ÖFFNUNGSZEITEN FIXED)
   ========================================= */

.mmd-success-widget {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
}

.mmd-sw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mmd-sw-title {
    margin: 0;
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 700;
}

.mmd-score-val {
    font-weight: 800;
    font-size: 1.2rem;
    color: #2563eb;
}

.mmd-progress-bg {
    width: 100%;
    background-color: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
    height: 10px;
    margin-bottom: 25px;
    position: relative;
}

.mmd-progress-fill {
    height: 100%;
    background-color: #2563eb;
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 99px;
    position: relative;
}

.mmd-todo-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mmd-todo-item {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: 0.2s;
}

.mmd-todo-item:hover {
    border-color: #cbd5e0;
    background: #fff;
}

.mmd-item-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

.mmd-item-score {
    color: #64748b;
    font-size: 0.85rem;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
}

.mmd-todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mmd-todo-list li {
    margin-bottom: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mmd-todo-list i {
    color: #dc2626;
    font-size: 14px;
}

.mmd-all-done {
    text-align: center;
    color: #16a34a;
    font-weight: 600;
    padding: 15px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #dcfce7;
}

/* MATRIX (Öffnungszeiten) - FIXED HEADER ALIGNMENT */
.mmd-hours-matrix {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-top: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Neuer Flex-Header für präzise Ausrichtung */
.mmd-hours-labels-header {
    display: flex;
    align-items: center;
    gap: 20px;
    /* Gleicher Gap wie in den Rows */
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
}

/* Spaltenbreiten manuell setzen, damit sie mit den Inputs übereinstimmen */
.mmd-hours-labels-header>*:nth-child(1) {
    width: 120px;
    flex-shrink: 0;
}

/* Tag */
.mmd-hours-labels-header>*:nth-child(2) {
    width: 140px;
    flex-shrink: 0;
}

/* Von (Input ca 130px) */
.mmd-hours-labels-header>*:nth-child(3) {
    flex-grow: 1;
}

/* Bis (Nimmt Rest ein, optisch über 2. Input) */
.mmd-hours-labels-header>*:nth-child(4) {
    width: 100px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 5px;
}

/* Status */

.mmd-day-main-row {
    display: grid;
    grid-template-columns: 120px 1fr 100px;
    gap: 20px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

.mmd-day-settings:last-child .mmd-day-main-row {
    border-bottom: none;
}

.mmd-day-label-col {
    padding-top: 10px;
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.mmd-slots-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mmd-hour-slot {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* FIX: Konstante Breite für Zeit-Inputs */
.mmd-time-field input[type="time"] {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
    color: #334155;
    font-size: 0.9rem;
    font-family: inherit;
    height: 40px;
    width: 140px !important;
    /* Fixe Breite für sauberes Raster */
    min-width: 130px;
}

.mmd-remove-slot-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: #fff0f0;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mmd-day-actions-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* --- BUTTON ANPASSUNG START --- */
/* Wir nutzen "button.class" und !important, um das globale Pink sicher zu überschreiben */
button.mmd-add-slot-btn {
    background: #ffffff !important;
    color: #000000 !important;
    /* Schwarz erzwingen */
    border: 1px dashed #000000 !important;
    /* Schwarzen Rand erzwingen */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0 !important;
    /* Globales Padding entfernen falls nötig */
}

button.mmd-add-slot-btn:hover {
    background: #CAB19A !important;
    /* Wunschfarbe Hover */
    color: #ffffff !important;
    /* Weißes Plus */
    border-color: #CAB19A !important;
    border-style: solid !important;
}

/* --- BUTTON ANPASSUNG ENDE --- */

.mmd-toggle-switch-wrapper {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.mmd-closed-toggle {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.mmd-switch-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #22c55e;
    transition: .3s;
    border-radius: 34px;
}

.mmd-switch-label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.mmd-closed-toggle:checked+.mmd-switch-label {
    background-color: #ef4444;
}

.mmd-closed-toggle:checked+.mmd-switch-label:before {
    transform: translateX(22px);
}

.mmd-toggle-switch-wrapper::after {
    content: 'Offen';
    position: absolute;
    right: 58px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: #22c55e;
    pointer-events: none;
    text-transform: uppercase;
}

.mmd-toggle-switch-wrapper:has(.mmd-closed-toggle:checked)::after {
    content: 'Zu';
    color: #ef4444;
}

/* =========================================
   6. MODAL & PREVIEW - WIDTH FIX
   ========================================= */

.mmd-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.mmd-preview-modal.is-open {
    opacity: 1;
    display: flex !important;
}

/* HIER DIE ÄNDERUNG: Breite auf 95% (Desktop) und max 1600px */
.mmd-preview-modal-inner {
    background: #fff;
    width: 95%;
    /* War 100% */
    max-width: 1600px;
    /* War 1200px */
    max-height: 90vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.mmd-preview-modal.is-open .mmd-preview-modal-inner {
    transform: translateY(0);
}

.mmd-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.mmd-close-modal {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
    padding: 5px;
}

.mmd-modal-body {
    padding: 30px;
    overflow-y: auto;
    background: #f8fafc;
    flex: 1;
}

.mmd-preview-container-inner {
    display: block;
    width: 100%;
    pointer-events: none;
    user-select: none;
}

.mmd-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    z-index: 10;
}

.mmd-btn-modal-action {
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.mmd-confirm-submit {
    background: #16a34a !important;
    color: #fff !important;
    border: 1px solid #16a34a !important;
}

/* Preview Card */
.mmd-preview-card-fallback {
    width: 360px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.mmd-preview-card-fallback:hover {
    transform: translateY(-5px);
}

.mmd-fallback-img-wrapper {
    height: 220px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.mmd-preview-img-bg {
    transition: transform 0.5s ease;
}

.mmd-preview-card-fallback:hover .mmd-preview-img-bg {
    transform: scale(1.05);
}

.mmd-fallback-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 99px;
    text-transform: uppercase;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.mmd-fallback-content {
    padding: 25px;
}

.mmd-preview-title {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.mmd-fallback-row {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mmd-fallback-row i {
    color: #94a3b8;
}

.mmd-fallback-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #334155;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    margin-top: 10px;
}

.mmd-fallback-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 6px;
}

.mmd-fallback-footer {
    padding: 20px 25px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: right;
    display: flex;
    justify-content: flex-end;
}

.mmd-preview-web {
    text-decoration: none;
    color: #2563eb;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


/* =========================================
   7. CATEGORY CHECKBOX FIXES
   ========================================= */

/* Secondary Categories: robust gegen Theme/Elementor Label-Styles */

/* Wrapper Styling (Beibehalten für Optik) */
.mmd-sec-cats-wrapper {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.mmd-sec-cats-title {
    margin-bottom: 10px !important;
}

#mmd-sec-limit-info {
    font-weight: normal;
    font-size: 0.9em;
    color: #666;
}

/* --- Secondary Categories: sauberes Alignment --- */
#mmd-sec-cats-wrapper,
#mmd-sec-cats-wrapper * {
    box-sizing: border-box;
}

#mmd-sec-cats-wrapper .mmd-sec-cats-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    column-gap: 28px !important;
    row-gap: 10px !important;
    max-width: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 150px;
    /* Ergänzt für Scroll-Verhalten */
}

/* Wichtig gegen Clipping/„rechts fehlt was“ in engen Shells */
#mmd-sec-cats-wrapper .mmd-sec-cat-item {
    min-width: 0 !important;
}

/* Das Label selbst als Grid: Checkbox-Spalte + Text-Spalte */
#mmd-sec-cats-wrapper .mmd-sec-cat-item>label {
    display: grid !important;
    grid-template-columns: 18px 1fr !important;
    align-items: start !important;
    column-gap: 10px !important;

    width: 100% !important;
    margin: 0 !important;
    text-align: left !important;
}

/* Checkbox bündig oben links, ohne Theme-Margins */
#mmd-sec-cats-wrapper .mmd-sec-cat-item input[type="checkbox"] {
    margin: 0 !important;
    justify-self: start !important;
    align-self: start !important;
}

/* Text darf umbrechen, ohne Layout zu zerstören */
#mmd-sec-cats-wrapper .mmd-sec-cat-item>label {
    white-space: normal !important;
    word-break: break-word !important;
}

/* =========================================
   8. SERVICE LEISTUNGEN (SERVICES) - STEP 5
   ========================================= */

.mmd-service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
}

.mmd-service-row:last-child {
    border-bottom: none;
}

.mmd-service-label {
    flex: 1;
    font-weight: 500;
    color: #334155;
    font-size: 1rem;
    padding-right: 20px;
}

.mmd-service-input-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Input Styles im Service Row */
.mmd-service-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: #fff;
    font-size: 0.9rem;
    min-width: 150px;
}

.mmd-service-text {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    width: 200px;
    font-size: 0.9rem;
}

.mmd-service-number {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    width: 100px;
    font-size: 0.9rem;
    text-align: right;
}

.mmd-service-time {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}

/* Suffix Style */
.mmd-suffix {
    font-size: 0.9rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-left: none;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    /* Falls Input davor ist, Border-Radius anpassen */
}

/* Wenn Suffix direkt am Input kleben soll, Input abrunden links */
.mmd-service-text+.mmd-suffix,
.mmd-service-number+.mmd-suffix {
    margin-left: -9px;
    /* Kleiner Hack für visuelle Verbindung */
    position: relative;
    z-index: 0;
}

.mmd-service-text,
.mmd-service-number {
    z-index: 1;
    position: relative;
}

.mmd-suffix-bool {
    margin-left: 10px;
    font-size: 0.85rem;
    color: #64748b;
    background: #f8fafc;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

/* Mobile Adjustments for Services */
@media (max-width: 600px) {
    .mmd-service-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .mmd-service-input-wrapper {
        width: 100%;
    }

    .mmd-service-text,
    .mmd-service-select {
        width: 100%;
    }
}


/* Responsive */
@media (max-width: 800px) {
    .mmd-form-layout {
        flex-direction: column;
    }

    .mmd-form-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding: 15px;
    }

    .mmd-step-nav {
        display: flex;
        gap: 10px;
        flex-direction: row;
    }

    .mmd-step-item {
        white-space: nowrap;
        margin: 0;
    }

    .mmd-back-link {
        display: none;
    }

    /* Modal responsive auf Mobile */
    .mmd-preview-modal-inner {
        width: 95% !important;
        max-width: none;
        max-height: 85vh;
    }
}

@media (max-width: 600px) {
    .mmd-hours-labels-header {
        display: none;
    }

    .mmd-day-main-row {
        grid-template-columns: 1fr;
        gap: 15px;
        position: relative;
    }

    .mmd-day-actions-col {
        position: absolute;
        top: 15px;
        right: 0;
        flex-direction: row;
        align-items: center;
    }

    .mmd-time-field input[type="time"] {
        width: 100% !important;
        max-width: none;
    }

    .mmd-hour-slot {
        flex-wrap: wrap;
    }

    /* Service Mobile Optimization */
    .mmd-service-row {
        align-items: flex-start;
    }
}