.horse-edit-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.horse-edit-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 20px;
}

.back-button:hover {
    background: #e9ecef;
}

.horse-edit-title {
    margin: 0;
    font-size: 24px;
}

.horse-edit-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 40px;
}

.form-section h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

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

/* Pedigree im Elementor-Stil */
.pedigree-section {
    margin-bottom: 30px;
    position: relative;
}

.pedigree-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.pedigree-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    border-radius: 8px;
    pointer-events: none;
}

.pedigree-column {
    background: white;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pedigree-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pedigree-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pedigree-item label {
    font-size: 0.85em;
    font-weight: 500;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pedigree-item input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pedigree-item input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    outline: none;
    background: white;
}

.pedigree-item--main {
    background: #f0f7ff;
    border-radius: 6px;
    padding: 10px;
    margin: -5px;
}

.pedigree-item--main label {
    color: #0056b3;
    font-weight: 600;
}

.pedigree-item--female {
    background: #fff0f5;
}

.pedigree-item--female label {
    color: #d63384;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.btn {
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #ced4da;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #0069d9;
}

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

.btn-success:hover:not(:disabled) {
    background: #218838;
}

.error-message {
    background: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    color: #721c24 !important;
    margin-top: 8px;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.success-message {
    background: #d4edda !important;
    border: 1px solid #c3e6cb !important;
    color: #155724 !important;
    margin-top: 8px;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .horse-edit-container {
        padding: 10px;
    }
    
    .horse-edit-form {
        padding: 15px;
    }
    
    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 15px;
    }
    
    .pedigree-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .save-button,
    .cancel-button {
        width: 100%;
    }
}

/* Zusätzliche mobile Breakpoints für bessere Grundinformationen-Darstellung */
@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .pedigree-container {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pedigree-container {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }
    
    .horse-edit-form {
        padding: 15px;
    }
    
    .form-group {
        padding: 12px;
        background-color: #f8f9fa;
        border-radius: 6px;
        border-left: 3px solid #007bff;
        margin-bottom: 15px;
    }
}

/* Modernisierte Überschriften */
.section-title {
  display: flex;
  align-items: center;
  font-size: 20px;
  margin-bottom: 20px;
  color: #333;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.section-icon {
  margin-right: 10px;
  color: #4CAF50;
  font-size: 24px;
}

.form-section.pedigree {
  margin-top: 30px;
  padding-top: 10px;
}

/* Loading-Status */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(76, 175, 80, 0.2);
  border-top: 4px solid #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.loading-text {
  color: #666;
  font-size: 16px;
  margin: 0;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Erweiterte Preisfelder */
.price-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
}

.price-section > label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
    display: block;
}

.price-type-selection {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.price-option {
    display: flex;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.radio-label input[type="radio"] {
    margin: 0;
    width: auto;
}

.price-input-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.price-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 200px;
}

.price-input-group input {
    flex: 1;
    margin-bottom: 0;
}

.price-on-request-display {
    padding: 10px 15px;
    background: #e8f4fd;
    border: 1px solid #b3d9f2;
    border-radius: 6px;
    text-align: center;
    max-width: 200px;
}

.price-on-request-text {
    font-weight: 600;
    color: #0073aa;
    font-size: 14px;
}

.price-currency {
    font-weight: 600;
    color: #495057;
    font-size: 16px;
}

.price-section select {
    max-width: 250px;
    margin-bottom: 0;
}

/* Responsive für Preisfelder */
@media (max-width: 768px) {
    .price-type-selection {
        flex-direction: column;
        gap: 10px;
    }
    
    .price-input-group {
        max-width: 100%;
    }
    
    .price-section select {
        max-width: 100%;
    }
}

/* Stallion Search Container Anpassungen */
.stallion-search-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.search-input-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.stallion-search-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.stallion-search-results {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Zusätzliche Suchfeld-Fixes für alle möglichen Selektoren */
.pedigree-container input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.pedigree-column input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Spezifische Fixes für dynamisch erstellte Suchfelder */
.stallion-search-section input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Beschreibungsfeld (Textarea) Fixes */
.form-group textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    resize: vertical;
}

/* Alle Textareas in der Form */
textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Spezifische Beschreibungsfeld-Fixes */
.horse-edit-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Alle Input-Felder (Name, etc.) */
.form-group input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Alle Input-Felder in der Form */
input[type="text"],
input[type="date"],
input[type="number"],
input[type="email"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Select-Felder */
.form-group select,
select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Spezifische Fixes für Date-Picker */
input[type="date"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
} 