/* static/css/components/companies.css */

.management-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.search-container {
    margin-bottom: 1.5rem;
}

.search-container .form-control {
    width: 100%;
    max-width: 400px;
}

/* User List Styles - nur notwendige Anpassungen */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.user-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.user-info {
    flex: 1;
}

.user-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.user-role {
    background: #B24A02;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.user-details {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

/* Company Layout */
.company-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    height: calc(100vh - 250px);
    max-height: 800px;
}

.company-list {
    border-right: 2px solid #eee;
    padding-right: 1rem;
    overflow-y: auto;
    max-height: 100%;
}

.company-details {
    overflow-y: auto;
    max-height: 100%;
}

.company-item {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.company-item:hover {
    background: #f5f5f5;
}

.company-item.active {
    border-color: #B24A02;
    background: #fff3e0;
}

/* Company Details */
.company-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.company-members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.member-actions {
    display: flex;
    gap: 0.5rem;
}

/* Members List */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

.member-info {
    flex: 1;
}

.member-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.member-type {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.member-type.owner {
    background: #ffeb3b;
    color: #333;
}

.member-type.student {
    background: #4caf50;
    color: white;
}

.member-details {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #666;
}

/* User Search in Modal */
.user-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.user-search-info {
    flex: 1;
}

/* Form Actions - verwenden bestehende Button Styles */
.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
    .company-layout {
        grid-template-columns: 1fr;
    }

    .company-list {
        border-right: none;
        border-bottom: 2px solid #eee;
        padding-right: 0;
        padding-bottom: 1rem;
        max-height: 300px;
    }

    .management-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .user-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .user-actions {
        align-self: flex-end;
    }

    .company-members-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* static/css/components/companies.css */

/* Dropdown Menu für Administration - Angepasst an bestehende Navbar */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: "▼";
    font-size: 0.7rem;
    margin-left: 0.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Hover-Effekt für Desktop */
@media (min-width: 769px) {
    .nav-item.dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
    }
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #B24A02;
    /* Gleiche Farbe wie Navbar */
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    border-top: 2px solid #a54302;
}

.dropdown-menu .nav-item {
    margin: 0;
}

.dropdown-menu .nav-link {
    padding: 0.75rem 1.5rem;
    color: white;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    border-radius: 0;
    font-size: 0.95rem;
}

.dropdown-menu .nav-link:hover {
    background: #a54302;
    /* Dunklere Farbe für Hover */
    transform: translateX(4px);
}

/* Mobile Styles für Dropdown */
@media (max-width: 768px) {
    .nav-item.dropdown {
        width: 100%;
    }

    .dropdown-toggle::after {
        float: right;
        margin-top: 0.25rem;
    }

    .dropdown-menu {
        position: static;
        display: none;
        background: #a54302;
        box-shadow: none;
        border-radius: 0;
        border-top: 1px solid #943b02;
        padding: 0;
    }

    .dropdown-menu.active {
        display: block;
        animation: slideDown 0.3s ease;
    }

    .dropdown-menu .nav-link {
        padding: 1rem 1.5rem 1rem 2.5rem;
        /* Eingerückt für Untermenü */
        border-bottom: 1px solid #943b02;
        font-size: 0.9rem;
    }

    .dropdown-menu .nav-link:hover {
        transform: none;
        background: #943b02;
    }

    .nav-item.dropdown:hover .dropdown-menu {
        display: none;
        /* Deaktiviere Hover auf Mobile */
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}