/* Utility: Hidden */
.hidden {
    display: none !important;
}

/* Action row for form buttons */
.action-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
/* Form Styling - MiniForening */

/* Info Box */
.info-box {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #2c3e50;
}

.info-box strong {
    display: block;
    margin-bottom: 5px;
}

/* Content block h2 styling - applied to content-block and form-section */
.content-block h2,
.form-section h2 {
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-left: 10px;
    font-size: 18px;
    border-left: 3px solid #3498db;
}

/* Form Sections */
.form-section {
    margin-bottom: 2px;
    padding: 30px 0 30px 0;
    border-bottom: 1px solid #ecf0f1;
}

.form-section:first-child {
    padding-top: 0;
}

.form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Labels */
label {
    display: block;
    margin: 20px 0 8px 0;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
}

label.required::after {
    content: ' *';
    color: #e74c3c;
}

.form-section > label:first-of-type {
    margin-top: 0;
}

/* Input Fields */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="date"],
input[type="file"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

input[type="file"] {
    padding: 8px;
    cursor: pointer;
}

/* Helper Text */
.helper-text {
    font-size: 12px;
    color: #7f8c8d;
    margin: 6px 0 0 0;
    line-height: 1.4;
}

/* Line Items Container */
#linjer_container {
    margin-top: 10px;
}

/* Expense Item Layout */
.expense-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-start;
}

.expense-item select {
    flex: 2;
    min-width: 0;
}

.expense-item input[type="text"] {
    flex: 1;
    min-width: 0;
}

.expense-item button.delete-expense {
    flex-shrink: 0;
    width: auto;
    min-width: 40px;
    height: 38px;
    padding: 0 12px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.expense-item button.delete-expense:hover:not(:disabled) {
    background: #c0392b;
}

.expense-item button.delete-expense:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Legacy line-item support (deprecated - use expense-item) */
.line-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-start;
}

.line-item select {
    flex: 2;
    min-width: 0;
}

.line-item input[type="text"] {
    flex: 1;
    min-width: 0;
}

.line-item button.delete-line {
    flex-shrink: 0;
    width: auto;
    min-width: 40px;
    height: 38px;
    padding: 0 12px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.line-item button.delete-line:hover:not(:disabled) {
    background: #c0392b;
}

.line-item button.delete-line:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Action Buttons Container */
form > div:last-child {
    margin-top: 20px;
}

/* Utility classes for layout and inline style replacement */
.flex-2 { flex: 2; }
.flex-1 { flex: 1; }
.badge-small { font-size: 11px; padding: 2px 8px; }
.text-muted { color: #999 !important; }
.text-center { text-align: center !important; }
.box-shadow-none { box-shadow: none !important; }
.border-radius-small { border-radius: 8px !important; }
.display-inline { display: inline !important; }
.display-none { display: none !important; }
.width-auto { width: auto !important; }
.padding-small { padding: 20px 0 !important; }
.margin-right-small { margin-right: 10px !important; }
.flex-gap-10 { display: flex !important; gap: 10px !important; }
.justify-space-between { justify-content: space-between !important; }
.info-box-error { background: #f8d7da !important; border-color: #dc3545 !important; color: #721c24 !important; }
.margin-5-0 { margin: 5px 0 0 0 !important; }
.font-size-14 { font-size: 14px !important; }
.password-btn-small { margin: 0 !important; padding: 4px 8px !important; font-size: 12px !important; }

/* Responsive Design */
@media (max-width: 768px) {
    .form-box {
        padding: 20px;
    }
    
    .line-item {
        flex-wrap: wrap;
    }
    
    .line-item select,
    .line-item input[type="text"] {
        flex: 1 1 100%;
    }
    
    .line-item button.delete-line {
        flex: 0 0 auto;
    }
    
    button, .btn {
        width: 100%;
        margin: 10px 0 0 0;
    }
    
    button.small {
        width: auto;
    }
}
