/* IAC Chat Integration */
.iac-chat-container-inline {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    width: 100%;
}

.iac-chat-container-inline .iac-chat-button {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.iac-chat-container-inline .iac-chat-button:hover {
    background: linear-gradient(135deg, #138496 0%, #1e7e34 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

.iac-chat-container-inline .iac-chat-link {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 0.85em;
    text-align: center;
}

.iac-chat-container-inline .iac-chat-link a {
    color: #007bff;
    text-decoration: none;
    display: block;
    width: 100%;
}

.iac-chat-container-inline .iac-chat-link a:hover {
    text-decoration: underline;
}

/* Bilder-View Styles */
.images-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.images-header {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: bold;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.image-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 20px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.image-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.image-card-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}

.image-card-id {
    background: #f8f9fa;
    color: #6c757d;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.image-card-thumbnail {
    text-align: center;
    margin-bottom: 15px;
}

.image-thumbnail {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-card-details {
    margin-bottom: 15px;
}

.image-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #f8f9fa;
}

.image-detail-label {
    font-weight: 500;
    color: #6c757d;
}

.image-detail-value {
    color: #2c3e50;
    font-weight: 500;
}

.image-card-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.image-no-thumbnail {
    background: #f8f9fa;
    color: #6c757d;
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    margin-bottom: 15px;
}

.image-no-thumbnail .material-icons {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.btn-new-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: block;
    margin: 0 auto;
}

.btn-new-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-download {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-download:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

.btn-delete-image {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-delete-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.image-upload-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
}

.image-upload-title {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
    font-weight: bold;
}

.image-upload-area {
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-area:hover {
    border-color: #5a6fd8;
    background: #e9ecef;
}

.image-upload-area.dragover {
    border-color: #495057;
    background: #dee2e6;
}

.image-upload-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.image-upload-text {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 10px;
}

.image-upload-hint {
    color: #6c757d;
    font-size: 14px;
    opacity: 0.8;
}

.image-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.image-stat {
    text-align: center;
}

.image-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
    margin: 0;
}

.image-stat-label {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
}

/* Legacy Table Styles für Rückwärtskompatibilität */
.image-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 2px solid #dee2e6;
}

.image-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e9ecef;
}

.image-table tr:hover {
    background-color: #f8f9fa;
}

.image-table .image-name {
    font-weight: 500;
    color: #2c3e50;
}

.image-table .image-extension {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
}

.image-table .image-location {
    color: #6c757d;
    font-size: 12px;
    font-family: monospace;
}

.image-table .action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.image-table .delete-button {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-table .delete-button:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.thumbnail-container {
    position: relative;
    display: inline-block;
}

.thumbnail-preview {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.thumbnail-preview:hover {
    transform: scale(1.1);
}

.thumbnail-container .download-button {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.thumbnail-container:hover .download-button {
    opacity: 1;
    transform: scale(1);
}

.thumbnail-container .download-button:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.new-image-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: block;
    margin: 20px auto;
}

.new-image-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Responsive Design für Bilder */
@media (max-width: 768px) {
    .images-grid {
        grid-template-columns: 1fr;
    }
    
    .image-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .image-card-actions {
        flex-direction: column;
    }
    
    .image-table {
        font-size: 12px;
    }
    
    .image-table th,
    .image-table td {
        padding: 8px 5px;
    }
    
    .thumbnail-preview {
        max-width: 40px;
        max-height: 40px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.image-card {
    animation: fadeIn 0.5s ease-out;
}

/* Error und Success States */
.error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: ""; }
    40% { content: "."; }
    60% { content: ".."; }
    80%, 100% { content: "..."; }
}

/* Name Edit Form Styles */
.name-edit-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
    max-width: 500px;
    margin: 0 auto 30px auto;
}

.name-edit-title {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 20px;
    font-weight: bold;
}

.name-edit-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.form-input {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

/* Responsive für Name Edit Form */
@media (max-width: 768px) {
    .name-edit-form {
        margin: 0 10px 30px 10px;
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-success,
    .btn-danger {
        width: 100%;
    }
}