/*
 * components.css
 *
 * Dieses Stylesheet enthält alle relevanten Component-Definitionen
 */

/* container */
.container {
    width: 1200px;
    padding: 0 20px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
}

main.login,main.overview,main.order,main.connect-services, main.admin-dashboard {
    .container {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* notification */
.notification {
    width: 1200px;
    padding: 0 20px;
    margin: var(--space-20px) auto 0 auto;
    box-sizing: border-box;

    .notification--success,
    .notification--hint,
    .notification--error {
        padding: var(--space-16px);
        border-radius: var(--space-8px);
        margin-bottom: var(--space-20px);
        font-size: var(--space-16px);
    }

    .notification--success {
        background: var(--success);
        border: 1px solid var(--green);
        color: var(--green);
    }

    .notification--hint {
        background: var(--hint);
        border: 1px solid var(--yellow);
        color: var(--yellow);
    }

    .notification--error {
        background: var(--error);
        border: 1px solid var(--red);
        color: var(--red);
    }
}

/* dashboard__tabs */
.dashboard__tabs {
    display: flex;
    width: 100%;
    height: 40px;
    align-items: center;
    border-radius: 12px;
    background-color: var(--blackEO);
    padding: 3px;
    box-sizing: border-box;
    column-gap: 10px;
    margin-bottom: var(--space-56px);

    a, div {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: var(--space-12px);
        text-decoration: none;
        height: 32px;
    }

    a:hover {
        text-decoration: underline;
    }

    .active {
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
        font-weight: bold;
    }
}

/* box / tile */
.box--lightgray {
    background-color: var(--blackFB);
    max-width: 730px;
    border: 1px solid #E8E8E8;
    border-radius: 32px;
    padding: 16px;
    box-sizing: border-box;
}

.box--gray {
    background-color: var(--blackEO);
    max-width: 730px;
    border-radius: 32px;
    border: 1px solid var(--blackE8);
}

.box--white {
    background-color: var(--white);
    max-width: 730px;
}

.admin-table-page-title,.admin-details-page-title {
    margin-top: var(--space-16px);
    margin-bottom: var(--space-8px);
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.chip {
    display: inline-block;
    padding: 4px 8px;
    background-color: var(--white);
    border-radius: var(--base-size);
    border: 1px solid var(--black55);
    font-size: 1rem;
    white-space: nowrap;
}

.admin-pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 1rem;
    border-top: 1px solid #eef1f5;

    .admin-pagination-info {
        font-size: 0.875rem;
        color: #344054;
        white-space: nowrap;
    }

    .admin-pagination-controls {
        display: flex;
        gap: 0.5rem;

        .admin-pagination-btn {
            padding: 0.5rem 1rem;
            border: 1px solid #d0d5dd;
            border-radius: 6px;
            background: #fff;
            color: #0066cc;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.875rem;
        }

        .admin-pagination-btn:hover:not(.admin-pagination-btn--disabled) {
            background: #f4f7fb;
            border-color: #0066cc;
        }

        .admin-pagination-btn--disabled {
            color: #999;
            cursor: not-allowed;
            opacity: 0.5;
        }
    }

    .admin-pagination-page-size {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.875rem;

        select {
            padding: 0.35rem 0.5rem;
            border: 1px solid #d0d5dd;
            border-radius: 4px;
            background: #fff;
            cursor: pointer;
        }
    }
}

.overview,.connect-services {
    .box--gray, .box--lightgray {
        max-width: none;
    }
}

/* items */
.items {
    .item {
        margin-bottom: var(--space-24px);

        .item__tag {
            background-color: var(--white-50);
            border: 1px solid var(--black55);
            border-radius: 16px;
            font-size: var(--space-12px);
            padding: 4px 6px;
            color: var(--black55);
            font-weight: bold;
            line-height: 16px;
        }

        .item__leikaids {
            display: flex;
            gap: 8px;
            padding: var(--space-16px);
        }

        .item__status {
            margin-top: 24px;
            margin-bottom: 24px;

            .item__status-title {
                font-weight: bold;
                font-size: var(--space-12px);
                color: var(--black55);
                margin-bottom: 6px;
            }

            .item__status-tags {
                display: flex;
                gap: 8px;

                .item__tag {
                    display: flex;
                    align-items: center;
                    gap: 4px;
                    color: var(--black);
                    font-weight: 400;

                    &::before {
                        content: '';
                        display: inline-block;
                        background-size: contain;
                        background-repeat: no-repeat;
                    }

                    &:first-child::before {
                        background-image: url('/icons/settings.svg');
                        width: 16px;
                        height: 16px;
                    }

                    &:last-child::before {
                        background-image: url('/icons/document.svg');
                        width: 10px;
                        height: 13px;
                    }
                }
            }
        }

        .item__admin-hint {
            padding: var(--space-16px) var(--space-16px) 0;
            background-color: var(--blueA0-20);
            border: 1px solid var(--blueA0);
            border-radius: 16px;
            margin-bottom: var(--space-24px);

            h4 {
                display: flex;
                align-items: center;
                gap: 4px;
                color: var(--black);
                font-weight: bold;

                &::before {
                    content: '';
                    display: inline-block;
                    width: 20px;
                    height: 22px;
                    background-image: url('/icons/attention.svg');
                    background-size: contain;
                    background-repeat: no-repeat;
                }
            }
        }

        .item__detail {
            background-color: var(--white);
            border-radius: 16px;
            padding: var(--space-16px);
            border: 1px solid var(--blackEB);
            overflow: hidden;

            h5[data-accordion] {
                font-size: var(--space-17px);
                line-height: 24px;
                display: flex;
                align-items: center;
                justify-content: space-between;
                cursor: pointer;
                user-select: none;

                &::after {
                    content: '';
                    display: inline-block;
                    width: 17px;
                    height: 10px;
                    background-image: url('/icons/arrow--down.svg');
                    background-size: contain;
                    background-repeat: no-repeat;
                }

                &.open::after {
                    background-image: url('/icons/arrow--up.svg');
                }
            }

            .item__detail-container {
                height: 0;
                opacity: 0;
                overflow: hidden;
                transition: height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;

                &.open {
                    height: auto;
                    opacity: 1;
                    margin-top: 16px;
                    border-top: 1px solid var(--blackEB);

                    section {
                        background-color: var(--blackFA);
                        margin-top: 16px;
                        padding: var(--space-16px);
                        border-radius: 8px;

                        h5 {
                            font-weight: bold;
                            display: flex;
                            align-items: center;
                            gap: 6px;

                            &.building::before,
                            &.fingerprint::before,
                            &.message::before,
                            &.keyboard::before {
                                content: '';
                                display: inline-block;
                                background-size: contain;
                                background-repeat: no-repeat;
                                flex-shrink: 0;
                            }

                            &.building::before {
                                background-image: url('/icons/building--solid.svg');
                                width: 10px;
                                height: 14px;
                            }

                            &.fingerprint::before {
                                background-image: url('/icons/fingerprint--solid.svg');
                                width: 13px;
                                height: 13px;
                            }

                            &.message::before {
                                background-image: url('/icons/message--dots.svg');
                                width: 13px;
                                height: 13px;
                            }

                            &.keyboard::before {
                                background-image: url('/icons/keyboard--solid.svg');
                                width: 15px;
                                height: 10px;
                            }
                        }

                        address {
                            display: flex;
                            flex-direction: column;
                            font-style: normal;
                        }

                        p, address {
                            line-height: var(--space-24px);
                            padding-bottom: 4px;
                            border-bottom: 1px solid var(--white);
                            margin: 0 0 var(--space-16px) 0;

                            &.hrb {
                                border-bottom-color: var(--blackEO);
                            }

                            &:last-child:not(.hrb) {
                                border-bottom: none;
                                padding: 0;
                                margin: 0;
                            }
                        }
                    }
                }
            }
        }
    }
}

/**********************/
/* übernommener Style */
/* prüf mich          */
/**********************/

/* Dashboard / Tiles */
.page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 40px 20px;
}

.page-title {
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: #222;
}

.tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.tile {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    flex: 1 1 280px;
    max-width: 400px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #1a237e;
    font-weight: 600;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.tile:hover {
    box-shadow: 0 8px 32px rgba(26, 35, 126, 0.18);
    transform: translateY(-4px) scale(1.03);
}

/* Page Content */
.page-content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    color: #444;
    font-size: 1rem;
}

.back-link {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    background: #1a237e;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
}

.back-link:hover {
    background: #0d1464;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.2);
    transform: translateY(-2px);
}

/* Details Button */
.btn-details {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    background: #1a237e;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
    cursor: pointer;
    border: none;
}

.btn-details:hover {
    background: #0d1464;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.2);
    transform: translateY(-1px);
}

.muk__login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.muk__login-logo {
    height: 24px;
    width: auto;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
    .tiles {
        flex-direction: column;
        align-items: center;
    }
}
