/* Bilag specific styles */

/* Filter toggle knap */
.filter-toggle {
    background: #3498db;
    color: white;
    border: none;
    padding: 15px 20px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-toggle:hover {
    background: #2980b9;
}

.filter-toggle::after {
    content: '▼';
    transition: transform 0.3s;
}

.filter-panel.active .filter-toggle::after {
    transform: rotate(180deg);
}

/* Filter panel */
.filter-panel {
    background: white;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
}

.filter-panel-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    padding: 0 20px;
}

.filter-panel.active .filter-panel-content {
    max-height: 1000px;
    padding: 20px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.filter-checkbox input {
    margin: 0;
    cursor: pointer;
}

.filter-checkbox.checked {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-apply {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.btn-clear {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

/* Active filters badges */
.active-filters {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-badge {
    background: #ecf0f1;
    padding: 8px 12px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.filter-badge .remove {
    cursor: pointer;
    font-weight: bold;
    color: #7f8c8d;
    transition: color 0.2s;
}

.filter-badge .remove:hover {
    color: #e74c3c;
}

/* Year sections */
.year-section {
    margin-bottom: 40px;
}

.year-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #3498db;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.year-header:hover {
    background: #2980b9;
}

.year-header.inactive {
    background: #ecf0f1;
    color: #7f8c8d;
}

.year-header.inactive:hover {
    background: #bdc3c7;
}

.year-title {
    font-size: 16px;
    font-weight: 600;
}

.year-pdf-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    background: #9b59b6;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.3s;
    width: 100%;
    margin-bottom: 15px;
}

.year-pdf-button:hover {
    background: #8e44ad;
}

.year-bilag-box {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: none;
    margin-top: 15px;
}

.year-bilag-box.active {
    display: block;
}

/* Bilag liste - 1 per linje */
.bilag-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bilag-row {
    background: white;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #95a5a6;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s;
}

.bilag-row.payment-kort {
    border-left-color: #3498db;
}

.bilag-row.payment-udlaeg {
    border-left-color: #e67e22;
}

.bilag-row:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.bilag-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 30px;
    border-bottom: 2px solid #ecf0f1;
}

.bilag-row-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bilag-row-info {
    flex: 1;
}

.bilag-row-actions {
    display: flex;
    justify-content: flex-start;
}

.bilag-row .bilag-id {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bilag-row .bilag-locked {
    background: #e74c3c;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
}

.bilag-row .bilag-date {
    color: #555;
    font-size: 14px;
    margin-bottom: 4px;
}

.bilag-row .bilag-date strong {
    font-weight: 600;
    color: #2c3e50;
}

.bilag-row .bilag-info {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.bilag-row .bilag-info strong {
    font-weight: 600;
    color: #2c3e50;
}

.bilag-row .bilag-amount {
    font-size: 18px;
    font-weight: bold;
    color: #27ae60;
    text-align: right;
}

.bilag-row .bilag-actions {
    display: flex;
    gap: 8px;
}

.bilag-row .btn-view {
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
    white-space: nowrap;
}

.bilag-row .btn-view:hover {
    background: #2980b9;
}

@media (max-width: 968px) {
    .bilag-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .bilag-row .bilag-actions {
        justify-content: flex-start;
    }
}
