@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Überschrift */
.kuba-widget-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* Funktionstexte */
.kuba-widget-func-label,
.kuba-widget-func-value {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

.kuba-widget-container {
    display: table;
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 99999;
    --kuba-widget-text: lch(from var(--kuba-widget-color) calc((50 - l) * 100) 0 0)
}
.kuba-widget-toggle {
    border-radius: 50% !important;
    overflow: hidden;
    padding: 0 !important;
    background: var(--kuba-widget-color, #228be6);
    color: var(--kuba-widget-text, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
}
.kuba-widget-toggle span svg {
    width: 150%;
    height: 150%;
    display: block;
    justify-self: center;
}
.kuba-widget-toggle {
    background: var(--kuba-widget-color, #228be6);
    color: var(--kuba-widget-text, #fff);
    border: none;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    box-shadow: 0 2px 8px rgba(34,139,230,0.08);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.kuba-widget-toggle.small  { width: 32px; height: 32px; }
.kuba-widget-toggle.medium { width: 48px; height: 48px; }
.kuba-widget-toggle.large  { width: 64px; height: 64px; }

.kuba-widget-toggle.small  span svg { width: 24px; height: 24px; }
.kuba-widget-toggle.medium span svg { width: 40px; height: 40px; }
.kuba-widget-toggle.large  span svg { width: 60px; height: 60px; }

.kuba-widget-toggle i {
    color: inherit;
    font-size: inherit;
    line-height: 1;
}
.kuba-widget-toggle:focus,
.kuba-widget-toggle:hover {
    box-shadow: 0 4px 16px rgba(34,139,230,0.15);
    outline: 2px solid #228be6;
    outline-offset: 2px;
}
.kuba-widget-panel {
    display: none;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    min-width: 520px;    /* erhöht */
    max-width: 96vw;     /* erhöht */
    margin: 24px;        /* Abstand zum Rand */
    padding: 0;
    overflow: hidden;
    animation: fadeIn 0.2s;
}
.kuba-widget-container.open .kuba-widget-panel {
    display: table;
    position: fixed;
    min-width: 400px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    margin: 24px;
}

/* Positionsklassen für Desktop */
.kuba-widget-container.bottom-right.open .kuba-widget-panel {
    right: 0;
    left: auto;
    bottom: 0;
    top: auto;
}
.kuba-widget-container.bottom-left.open .kuba-widget-panel {
    left: 0;
    right: auto;
    bottom: 0;
    top: auto;
}
.kuba-widget-container.top-right.open .kuba-widget-panel {
    right: 0;
    left: auto;
    top: 0;
    bottom: auto;
}
.kuba-widget-container.top-left.open .kuba-widget-panel {
    left: 0;
    right: auto;
    top: 0;
    bottom: auto;
}

/* Optional für kleine Bildschirme */
@media (max-width: 600px) {
    .kuba-widget-container {
        left: 8px !important;
        right: 8px !important;
        bottom: 16px !important;
        width: auto !important;
        max-width: calc(100vw - 16px) !important;
    }
    .kuba-widget-panel {
        min-width: 0 !important;
        width: 95% !important;
        max-width: 100% !important;
        margin: 10px !important;
        border-radius: 12px !important;
    }
}
.kuba-widget-container.open .kuba-widget-toggle {
    display: none;
}
.kuba-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--kuba-widget-color, #0073aa);
    color: #fff;
    padding: 14px 18px;
}
.kuba-widget-title {
    font-size: 21px !important;
    margin: 0;
    color: #fff;
}
.kuba-widget-header-actions button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.3em;
    margin-left: 8px;
    cursor: pointer;
    transition: color 0.2s;
}
.kuba-widget-header-actions button:hover {
    color: #ffe066;
}
.kuba-widget-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.kuba-widget-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
    justify-content: center;
    justify-items: center;
    align-items: stretch;
}
.kuba-widget-section-title {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 6px;
    display: block;
    color: #222;
}
.kuba-widget-buttons {
    display: flex;
    gap: 8px;
}
.kuba-widget-buttons button {
    background: #f4f4f4;
    color: #222;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.kuba-widget-buttons button:hover,
.kuba-widget-buttons button:focus {
    background: #e0e0e0;
    border-color: var(--kuba-widget-color, #0073aa);
}
.kuba-widget-footer {
    background: #f8f8f8;
    padding: 10px 16px;
    text-align: right;
    color: #888;
    border-top: 1px solid #eee;
}
.kuba-widget-footer,
.kuba-widget-footer-text {
    font-family: 'Poppins', sans-serif;
    font-size: 14px !important;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px);}
    to { opacity: 1; transform: translateY(0);}
}
.kuba-widget-header,
.kuba-widget-title,
.kuba-widget-header-actions button {
    color: var(--kuba-widget-text, #fff);
}

.kuba-widget-function-row {
    display: flex;
    align-items: stretch;
    margin-bottom: 0;
    justify-content: flex-start;
    flex: 1 1 160px;
}

.kuba-widget-func-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 180px;
    max-width: 220px;
    min-height: 120px;
    height: 120px;
    padding: 14px 12px 10px 12px; 
    border-radius: 18px;
    border: 2px solid transparent;
    background: #fff;
    box-shadow: 0 2px 12px rgba(34,139,230,0.06);
    cursor: pointer;
    transition: border 0.2s, box-shadow 0.2s, background 0.2s;
    position: relative;
}
.kuba-widget-func-btn:hover,
.kuba-widget-func-btn:focus {
    border-color: #228be6;
    box-shadow: 0 4px 16px rgba(34,139,230,0.10);
    outline: none;
}
.kuba-widget-func-btn.active {
    border-color: #228be6;
    background: #f8fafc;
}

.kuba-widget-func-steps {
    display: flex;
    gap: 2px;
    justify-content: center;
    width: 100%;
    min-width: 60px;
    min-height: 6px;
    visibility: hidden;
}
.kuba-widget-func-btn.active .kuba-widget-func-steps {
    visibility: visible;
}

.kuba-widget-func-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 2em;
    background: #f4f6fa;
    color: #222;
    border: 2px solid #e0e0e0;
    box-shadow: none;
    transition: border 0.2s, color 0.2s, background 0.2s;
}

.kuba-widget-func-btn.active .kuba-widget-func-icon {
    border-color: #228be6;
    background: #e7f5ff;
    color: #222;
}

.kuba-widget-func-label {
    font-size: 16px !important;
    color: #222;
    font-weight: 500;
    text-align: center;
    margin-bottom: 0;
    pointer-events: none;
    flex: 0 0 auto;
}

.kuba-widget-func-label-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    margin-top: 0;
    min-width: 120px;
    justify-content: center;
}
.kuba-widget-func-value {
    font-size: 16px !important;
    color: #111;
    font-weight: 600;
    margin: 0;
    display: inline-block;
    min-width: 48px;
    text-align: left;
}
.kuba-widget-func-btn:not(.active) .kuba-widget-func-value {
    opacity: 0.5;
}
.kuba-widget-func-steps {
    display: none;
    gap: 2px;
    justify-content: center;
    width: 100%;
    min-width: 60px;
}
.kuba-widget-func-btn.active .kuba-widget-func-steps {
    display: flex;
}
.kuba-widget-func-steps span {
    display: block;
    width: 18px;
    height: 4px;
    border-radius: 2px;
    background: #0073aa;
    opacity: 0.25;
    transition: background 0.2s, opacity 0.2s;
}
.kuba-widget-func-steps span.active {
    opacity: 1;
    background: #0073aa;
}

@media (max-width: 600px) {
    .kuba-widget-section {
        grid-template-columns: 1fr 1fr;
    }
    .kuba-widget-func-btn {
        min-width: 0;
        min-height: 100px;
        padding: 14px 6px 12px 6px;
    }
}

.kuba-widget-toggle.custom span svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: auto;
}