:root {
    --fm-green-primary: #059669; /* Waldorf/Premium Green */
    --fm-green-dark: #064e3b;
    --fm-green-light: #d1fae5;
    --fm-bg-glass: rgba(255, 255, 255, 0.85);
    --fm-bg-glass-hover: rgba(255, 255, 255, 0.95);
    --fm-border: rgba(5, 150, 105, 0.15);
    --fm-text-main: #1f2937;
    --fm-text-muted: #6b7280;
    --fm-shadow: 0 10px 30px -5px rgba(5, 150, 105, 0.1);
    --fm-shadow-hover: 0 20px 40px -10px rgba(5, 150, 105, 0.25);
}

.fm-pricing-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--fm-text-main);
    overflow-x: auto;
    padding: 1rem 0;
    font-size: 0.85rem; /* Globale Verkleinerung der Schrift */
}

/* Base Table Styling */
.fm-pricing-table {
    width: 100%;
    min-width: 850px; /* Reduziert von 1000px, damit es frÃ¼her auf den Bildschirm passt */
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    text-align: center;
}

/* Sticky Headers */
.fm-pricing-table thead th {
    position: sticky;
    top: 0;
    background: var(--fm-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10;
    padding: 1.5rem 0.5rem 0.75rem 0.5rem; /* Mehr Padding oben, damit die Box hÃ¶her wird */
    border-bottom: 2px solid var(--fm-border);
    transition: all 0.3s ease;
}

.fm-pricing-table th.fm-tier-header {
    width: 12%;
    border-radius: 8px 8px 0 0;
}

/* Featured 'Pro' Tier Header */
.fm-pricing-table th.fm-tier-featured {
    background: var(--fm-green-primary);
    color: white;
    border: none;
    transform: scale(1.02);
    box-shadow: 0 -5px 10px rgba(5, 150, 105, 0.2);
    position: relative;
}

.fm-tier-featured .fm-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #fbbf24;
    color: #92400e;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Tier Names & Prices */
.fm-tier-name {
    display: block;
    font-size: 0.95rem; /* Kompakter */
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.fm-tier-price {
    display: block;
    font-size: 1.15rem; /* Kompakter */
    font-weight: 800;
    line-height: 1.2;
}

.fm-tier-price small {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Row Headers (Features) */
.fm-pricing-table tbody th {
    text-align: left;
    padding: 0.5rem 0.75rem; /* Deutlich weniger Padding */
    font-weight: 600;
    color: var(--fm-text-main);
    background: transparent;
    border-bottom: 1px solid var(--fm-border);
    white-space: nowrap;
    font-size: 0.85rem;
}

/* Feature Sections */
.fm-pricing-table tbody th.fm-section-header {
    background: var(--fm-green-light);
    color: var(--fm-green-dark);
    font-size: 0.85rem;
    font-weight: 700;
    padding-top: 0.4rem;
    padding-bottom: 0.2rem;
    border-bottom: 2px solid var(--fm-green-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* Data Cells */
.fm-pricing-table td {
    padding: 0.5rem; /* Weniger Padding fÃ¼r weniger HÃ¶he */
    border-bottom: 1px solid var(--fm-border);
    background: var(--fm-bg-glass);
    transition: all 0.2s ease;
    vertical-align: middle;
    font-size: 0.85rem;
}

/* Featured Column Data Cells */
.fm-pricing-table td.fm-col-featured {
    background: rgba(5, 150, 105, 0.05);
    border-left: 2px solid var(--fm-green-primary);
    border-right: 2px solid var(--fm-green-primary);
    font-weight: 600;
}

/* Hover Effects on Rows */
.fm-pricing-table tbody tr:not(.fm-section-row):hover td {
    background: var(--fm-bg-glass-hover);
    transform: translateY(-1px);
    box-shadow: var(--fm-shadow);
}
.fm-pricing-table tbody tr:not(.fm-section-row):hover td.fm-col-featured {
    background: rgba(5, 150, 105, 0.1);
}

/* Checkmarks */
.fm-check {
    display: inline-block;
    color: var(--fm-green-primary);
    background: var(--fm-green-light);
    border-radius: 50%;
    width: 22px; /* Etwas kleiner */
    height: 22px;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.2);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Buttons */
.fm-btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.fm-btn-outline {
    border: 2px solid var(--fm-green-primary);
    color: var(--fm-green-primary);
}
.fm-btn-outline:hover {
    background: var(--fm-green-primary);
    color: white;
}

.fm-btn-primary {
    background: var(--fm-green-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3);
}
.fm-btn-primary:hover {
    background: var(--fm-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4);
    color: white;
}

/* Ultimate Note Box */
.fm-ultimate-note {
    grid-column: 1 / -1;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, var(--fm-green-dark) 0%, var(--fm-green-primary) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--fm-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.fm-ultimate-note h4 {
    margin: 0 0 0.25rem 0;
    color: #fbbf24;
    font-size: 1.1rem;
}
.fm-ultimate-note p {
    margin: 0;
    opacity: 0.9;
}
.fm-ultimate-note a {
    color: white;
    text-decoration: underline;
    font-weight: bold;
}

/* Animations */
@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive Table Wrapper */
.fm-table-wrapper {
    overflow-x: auto;
    padding-top: 15px; /* Verhindert das Abschneiden des "Empfehlung"-Badges */
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    box-shadow: var(--fm-shadow);
    background: white;
}

/* Custom Scrollbar for matrix */
.fm-table-wrapper::-webkit-scrollbar {
    height: 6px;
}
.fm-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.fm-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--fm-green-primary);
    border-radius: 3px;
}
.fm-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--fm-green-dark);
}

/* Highlighted Number (e.g. for Licenses) */
.fm-highlight-number {
    display: inline-block;
    background: var(--fm-green-light);
    color: var(--fm-green-dark);
    font-weight: 800;
    font-size: 1.1rem;
    padding: 0.1rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--fm-green-primary);
    box-shadow: 0 2px 5px rgba(5, 150, 105, 0.2);
}

/* Modal Styling */
.fm-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999999; /* Very high z-index to stay above WP admin bar and themes */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s forwards;
}
.fm-modal-content {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 550px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transform: translateY(20px);
    animation: slideUp 0.3s forwards;
    max-height: 90vh;
    overflow-y: auto;
}
.fm-modal-close {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}
.fm-modal-close:hover {
    color: var(--fm-green-dark);
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(20px); }
    to { transform: translateY(0); }
}

/* Contact Form 7 Reset inside Modal */
.fm-modal-content .wpcf7 {
    margin-top: 1.5rem;
}
.fm-modal-content .wpcf7 label {
    color: var(--fm-text-main) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    display: block !important;
    margin-bottom: 0.5rem !important;
}
.fm-modal-content .wpcf7 input[type="text"],
.fm-modal-content .wpcf7 input[type="email"],
.fm-modal-content .wpcf7 input[type="tel"],
.fm-modal-content .wpcf7 textarea,
.fm-modal-content .wpcf7 select {
    width: 100% !important;
    background: #f9fafb !important;
    border: 1px solid #d1d5db !important;
    color: var(--fm-text-main) !important;
    padding: 0.75rem !important;
    border-radius: 6px !important;
    font-family: inherit !important;
    margin-bottom: 1rem !important;
    box-sizing: border-box !important;
}
.fm-modal-content .wpcf7 input:focus,
.fm-modal-content .wpcf7 textarea:focus,
.fm-modal-content .wpcf7 select:focus {
    border-color: var(--fm-green-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2) !important;
}
.fm-modal-content .wpcf7 input[type="submit"] {
    background: var(--fm-green-primary) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 2rem !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    margin-top: 1rem !important;
}
.fm-modal-content .wpcf7 input[type="submit"]:hover {
    background: var(--fm-green-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3) !important;
}
/* Verhindert, dass unsichtbare Elemente (z.B. Lade-Spinner) das Layout stören */
.fm-modal-content .wpcf7 .wpcf7-spinner {
    display: none !important;
}
