/* Carousel Admin Panel Styles */
.carousel-admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.carousel-admin-panel.active {
    opacity: 1;
    visibility: visible;
}

.admin-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.admin-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8f9fa;
}

.admin-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #374151;
}

.admin-body {
    padding: 24px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.admin-section {
    margin-bottom: 32px;
}

.admin-section:last-child {
    margin-bottom: 0;
}

.admin-section h3 {
    margin: 0 0 16px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 8px;
}

.admin-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background: #2563eb;
}

.images-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.image-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.image-item:hover {
    border-color: #d1d5db;
}

.image-preview {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 16px;
    flex-shrink: 0;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-info h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.image-info p {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

.order-badge {
    background: #e5e7eb;
    color: #374151;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.image-actions {
    display: flex;
    gap: 8px;
}

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit {
    background: #10b981;
    color: white;
}

.btn-edit:hover {
    background: #059669;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

/* Edit Modal */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.edit-content {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.edit-content h3 {
    margin: 0 0 20px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.btn-cancel {
    background: #6b7280;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-cancel:hover {
    background: #4b5563;
}

/* Loading and Empty States */
.loading,
.empty,
.error {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-style: italic;
}

.error {
    color: #ef4444;
}

/* Notifications */
.admin-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.admin-notification.show {
    transform: translateX(0);
}

.admin-notification.success {
    background: #10b981;
}

.admin-notification.error {
    background: #ef4444;
}

.admin-notification.info {
    background: #3b82f6;
}

/* Dark Mode */
.dark .admin-content {
    background: #1f2937;
}

.dark .admin-header {
    background: #111827;
    border-bottom-color: #374151;
}

.dark .admin-header h2 {
    color: #f9fafb;
}

.dark .close-btn {
    color: #9ca3af;
}

.dark .close-btn:hover {
    color: #d1d5db;
}

.dark .admin-section h3 {
    color: #f9fafb;
}

.dark .admin-form {
    background: #111827;
    border-color: #374151;
}

.dark .form-group label {
    color: #d1d5db;
}

.dark .form-group input,
.dark .form-group textarea {
    background: #1f2937;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .form-group input:focus,
.dark .form-group textarea:focus {
    border-color: #3b82f6;
}

.dark .image-item {
    background: #111827;
    border-color: #374151;
}

.dark .image-info h4 {
    color: #f9fafb;
}

.dark .image-info p {
    color: #9ca3af;
}

.dark .order-badge {
    background: #374151;
    color: #d1d5db;
}

.dark .edit-content {
    background: #1f2937;
}

.dark .edit-content h3 {
    color: #f9fafb;
}

.dark .form-actions {
    border-top-color: #374151;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .admin-header {
        padding: 16px 20px;
    }
    
    .admin-body {
        padding: 20px;
    }
    
    .image-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .image-preview {
        width: 100%;
        height: 120px;
        margin-right: 0;
    }
    
    .image-details {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .image-actions {
        align-self: flex-end;
    }
}
