/* KKI Beitragsrechner Styles */
.kki-beitragsrechner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.kki-loading {
    text-align: center;
    padding: 40px;
}

.kki-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.kki-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.kki-results-container {
    margin-top: 30px;
}

.kki-kasse-data {
    background: #fff;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.kki-kasse-head {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.kki-kasse-head img {
    max-width: 100px;
    margin-right: 20px;
}

.kki-kasse-sub-data {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.kki-kasse-sub-data > div {
    flex: 1 1 200px;
}

.kki-filter-sidebar {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.kki-filter-checkbox-container {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.kki-filter-checkbox {
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .kki-kasse-head {
        flex-direction: column;
        text-align: center;
    }

    .kki-kasse-sub-data {
        flex-direction: column;
    }
}

/* KKI Beitragsrechner Styles - Tailwind CSS Replacement */

/* Container und Layout */
.kki-beitragsrechner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Tailwind Utility Classes */

/* Positioning */
.relative {
    position: relative;
}

/* Margins */
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-2 {
    margin-bottom: 0.5rem; /* 8px */
}

.mb-4 {
    margin-bottom: 1rem; /* 16px */
}

.mt-3 {
    margin-top: 0.75rem; /* 12px */
}

.mt-4 {
    margin-top: 1rem; /* 16px */
}

.mt-8 {
    margin-top: 2rem; /* 32px */
}

.mr-4 {
    margin-right: 1rem; /* 16px */
}

/* Max Width */
.max-w-\[600px\] {
    max-width: 600px;
}

/* Width */
.w-full {
    width: 100%;
}

.w-16 {
    width: 4rem; /* 64px */
}

.w-12 {
    width: 3rem; /* 48px */
}

/* Height */
.h-10 {
    height: 2.5rem; /* 40px */
}

.h-12 {
    height: 3rem; /* 48px */
}

/* Padding */
.p-1 {
    padding: 0.25rem; /* 4px */
}

.p-2 {
    padding: 0.5rem; /* 8px */
}

.p-3 {
    padding: 0.75rem; /* 12px */
}

.py-2 {
    padding-top: 0.5rem; /* 8px */
    padding-bottom: 0.5rem; /* 8px */
}

.py-8 {
    padding-top: 2rem; /* 32px */
    padding-bottom: 2rem; /* 32px */
}

.px-6 {
    padding-left: 1.5rem; /* 24px */
    padding-right: 1.5rem; /* 24px */
}

/* Display */
.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.flex {
    display: flex;
}

.hidden {
    display: none;
}

/* Flex Properties */
.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.items-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem; /* 8px */
}

/* Text */
.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem; /* 14px */
    line-height: 1.25rem; /* 20px */
}

.text-white {
    color: rgb(255, 255, 255);
}

.text-gray-600 {
    color: rgb(75, 85, 99);
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

/* Borders */
.border {
    border-width: 1px;
}

.border-b-2 {
    border-bottom-width: 2px;
}

.border-gray-300 {
    border-color: rgb(209, 213, 219);
}

.border-gray-900 {
    border-color: rgb(17, 24, 39);
}

.rounded-lg {
    border-radius: 0.5rem; /* 8px */
}

.rounded-full {
    border-radius: 9999px;
}

/* Backgrounds */
.bg-blue-600 {
    background-color: rgb(37, 99, 235);
}

.bg-gray-300 {
    background-color: rgb(209, 213, 219);
}

.bg-green-600 {
    background-color: rgb(22, 163, 74);
}

.bg-white {
    background-color: rgb(255, 255, 255);
}

/* Hover States */
.hover\:bg-blue-700:hover {
    background-color: rgb(29, 78, 216);
}

/* Transitions */
.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.ease-in-out {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animations */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Shadow */
.shadow-md {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   TOGGLE SWITCH (Custom Checkbox)
   Neue Version mit Label-Wrapper
   ======================================== */

/* Label Container für Toggle Switch */
#extra-salary label[for="salary-extra-salary"] {
    cursor: pointer;
    display: inline-block;
}

/* Toggle Switch Container (das span-Element innerhalb des Labels) */
#extra-salary label[for="salary-extra-salary"] > span {
    width: 4rem; /* 64px */
    height: 2.5rem; /* 40px */
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0.25rem; /* 4px */
    background-color: rgb(209, 213, 219); /* bg-gray-300 */
    border-radius: 9999px; /* rounded-full */
    transition: background-color 300ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Toggle Switch - der bewegliche Kreis (::after) */
#extra-salary label[for="salary-extra-salary"] > span::after {
    content: '';
    width: 2rem; /* 32px - entspricht after:w-8 */
    height: 2rem; /* 32px - entspricht after:h-8 */
    background-color: rgb(255, 255, 255); /* after:bg-white */
    border-radius: 9999px; /* after:rounded-full */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /* after:shadow-md */
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1); /* after:duration-300 */
    display: block;
    transform: translateX(0);
}

/* Wenn Checkbox aktiviert ist - Hintergrundfarbe ändern */
#salary-extra-salary:checked ~ label[for="salary-extra-salary"] > span {
    background-color: rgb(22, 163, 74); /* peer-checked:bg-green-600 */
}

/* Wenn Checkbox aktiviert ist - Kreis nach rechts bewegen */
#salary-extra-salary:checked ~ label[for="salary-extra-salary"] > span::after {
    transform: translateX(1.5rem); /* 24px - peer-checked:after:translate-x-6 */
}

/* Hover-Effekt für besseres UX */
#extra-salary label[for="salary-extra-salary"]:hover > span {
    opacity: 0.9;
}

/* ======================================== */

/* Form Group Styles */
.kki-form-group label {
    font-weight: 500;
    color: #374151;
}

.kki-form-group input,
.kki-form-group select {
    font-size: 16px;
}

.kki-form-group input:focus,
.kki-form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Loading Spinner */
.kki-loading {
    text-align: center;
    padding: 40px;
}

/* Ergebnis-Styles */
.kasse-data {
    background: #fff;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.kasse-head {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.kasse-head img {
    max-width: 100px;
    margin-right: 20px;
}

.kasse-sub-data {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.kasse-sub-data > div {
    flex: 1 1 200px;
}

.kasse-sub-data-item {
    font-weight: bold;
    display: block;
    font-size: 1.3em;
}

.filter-sidebar {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-checkbox-container {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
}

.filter-checkbox {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kasse-head {
        flex-direction: column;
        text-align: center;
    }

    .kasse-head img {
        margin: 0 auto 15px;
    }

    .kasse-sub-data {
        flex-direction: column;
    }

    .kki-beitragsrechner-container {
        padding: 15px;
    }

    /* Mobile: Volle Breite für Formulare */
    .max-w-\[600px\] {
        max-width: 100%;
    }
}

/* Print Styles */
@media print {
    .kki-form-group button,
    #rechner-container {
        display: none;
    }
}