/**
 * Frontend CSS für Zuchtkontrollen
 */

/* Container */
.zk-kontrollen-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.zk-kontrollen-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.zk-kontrollen-header h2 {
    font-size: 28px;
    margin: 0 0 10px 0;
    color: #333;
}

.zk-kontrollen-description {
    color: #666;
    font-size: 14px;
}

/* Navigation */
.zk-kontrollen-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
}

.zk-nav-buttons {
    display: flex;
    gap: 10px;
}

/* Buttons */
.zk-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.zk-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

.zk-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.zk-btn-primary {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.zk-btn-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.zk-btn-secondary {
    background: #666;
    color: white;
    border-color: #666;
}

.zk-btn-success {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.zk-btn-success:hover {
    background: #218838;
    border-color: #1e7e34;
}

.zk-btn-icon {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #666;
}

.zk-btn-icon:hover {
    color: #0073aa;
}

/* Stats */
.zk-kontrollen-stats {
    display: flex;
    gap: 20px;
}

.zk-stat {
    font-size: 14px;
    color: #666;
}

.zk-stat strong {
    color: #333;
    font-size: 16px;
}

/* Form */
.zk-form-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.zk-form-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.zk-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.zk-form-group {
    margin-bottom: 20px;
}

.zk-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

/* Readonly Fields */
.zk-readonly-field {
    padding: 8px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.zk-form-group input[type="text"],
.zk-form-group input[type="email"],
.zk-form-group input[type="tel"],
.zk-form-group input[type="date"],
.zk-form-group select,
.zk-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.zk-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.zk-field-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Mitglieder-Suche */
.zk-member-search-wrapper {
    position: relative;
}

.zk-member-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.zk-member-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.zk-search-results-list {
    padding: 0;
}

.zk-search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.zk-search-result-item:hover {
    background: #f5f5f5;
}

.zk-search-result-item:last-child {
    border-bottom: none;
}

.zk-member-number {
    color: #666;
    font-size: 12px;
}

.zk-loading,
.zk-no-results,
.zk-error {
    padding: 10px 12px;
    text-align: center;
    color: #666;
}

.zk-error {
    color: #d00;
}

/* Table */
.zk-kontrollen-table-wrapper {
    overflow-x: auto;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.zk-kontrollen-table {
    width: 100%;
    border-collapse: collapse;
}

.zk-kontrollen-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #e0e0e0;
}

.zk-kontrollen-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.zk-kontrollen-table tr:hover {
    background: #fafafa;
}

/* Status */
.zk-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.zk-status-entwurf {
    background: #fff3cd;
    color: #856404;
}

.zk-status-in_bearbeitung {
    background: #cce5ff;
    color: #004085;
}

.zk-status-abgeschlossen {
    background: #d4edda;
    color: #155724;
}

.zk-status-storniert {
    background: #f8d7da;
    color: #721c24;
}

.zk-status-aktiv {
    background: #d4edda;
    color: #155724;
}

.zk-status-inaktiv {
    background: #f8f9fa;
    color: #6c757d;
}

.zk-status-gesperrt {
    background: #f8d7da;
    color: #721c24;
}

/* Notices */
.zk-notice {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.zk-notice-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.zk-notice-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.zk-notice-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

/* Actions */
.zk-actions {
    display: flex;
    gap: 5px;
}

.zk-form-actions {
    display: flex;
    gap: 10px;
    padding: 20px;
    background: #f5f5f5;
    border-top: 2px solid #e0e0e0;
    margin: -20px -20px 0 -20px;
    border-radius: 0 0 5px 5px;
}

/* Checkbox Groups */
.zk-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zk-checkbox-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

.zk-checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* Filter Form */
.zk-filter-form {
    display: flex;
    gap: 15px;
    align-items: end;
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 20px;
}

.zk-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.zk-filter-group label {
    font-size: 12px;
    color: #666;
    font-weight: bold;
}

/* Detail View */
.zk-kontrolle-detail {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.zk-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.zk-detail-content {
    padding: 20px;
}

.zk-detail-section {
    margin-bottom: 30px;
}

.zk-detail-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.zk-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.zk-detail-item label {
    font-weight: bold;
    color: #666;
    margin-right: 10px;
}

.zk-detail-field {
    margin-bottom: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-left: 3px solid #0073aa;
}

.zk-detail-field label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

/* Kontrolltyp Selection */
.zk-kontrolltyp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.zk-kontrolltyp-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.zk-kontrolltyp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.zk-kt-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.zk-kontrolltyp-card h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.zk-kontrolltyp-card p {
    color: #666;
    margin: 0 0 20px 0;
}

/* No Results */
.zk-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.zk-no-results p {
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .zk-form-row {
        grid-template-columns: 1fr;
    }
    
    .zk-kontrollen-navigation {
        flex-direction: column;
        gap: 20px;
    }
    
    .zk-kontrollen-stats {
        flex-wrap: wrap;
    }
    
    .zk-filter-form {
        flex-direction: column;
        align-items: stretch;
    }
}
