/* Generische Modal-Styles für alle Modals (inkl. Chatbot) */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Smart Paste Modal hat höhere Priorität */
#smart-paste-modal {
  z-index: 5000;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  max-width: 480px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem 1rem 1.5rem;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}
.close-btn:hover {
  color: #e74c3c;
}

.modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1.5rem;
  background: #fff;
  margin-top: 3rem;
}

.modal-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid #eee;
  background: #f8f9fa;
  text-align: right;
}

@media (max-width: 600px) {
  .modal-content {
    max-width: 100vw;
    border-radius: 0;
  }
}


/* Tab Navigation */
.tab-navigation {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1.5rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #4a90e2;
    background: rgba(74, 144, 226, 0.05);
}

.tab-button.active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
    background: rgba(74, 144, 226, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.custom-style-editor {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    min-height: 200px;
    resize: vertical;
    font-size: 0.9rem;
}

.css-preview-info {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem;
    font-size: 0.9rem;
}

.css-preview-info ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.css-preview-info code {
    background: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}


/* AI-Button im Card-Modal */
#ai-generate-btn {
    position: absolute;
    top: 0;
    right: 0.5rem;
    padding: 0.3rem 0.7rem;
    font-size: 1.1rem;
    z-index: 2;
}

/* AI Prompt Modal */
#ai-prompt-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 4100;
    align-items: center;
    justify-content: center;
}
#ai-prompt-modal.show {
    display: flex;
}
#ai-prompt-modal .modal-content {
    width: 100%;
    border-radius: 10px;
    padding: 0rem;
    background: #fff;
    color: #222;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    position: relative;
}
#ai-prompt-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
#ai-prompt-modal .close-btn {
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
}
input#ai-include-column-context {
    width: auto;
}

/* AI-Icon Button Styling */
.ai-icon-container {
    position: absolute;
    right: 8px;
    top: 0;
    z-index: 2;
}
.ai-icon-btn {
    background: none;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    padding: 2px 6px;
    color: #444;
    transition: color 0.2s;
}

/* Smart Paste Modal Styles */
.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-icon {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.btn-icon:hover {
    background-color: #f5f5f5;
    border-color: #bbb;
    transform: translateY(-1px);
}

.paste-btn {
    color: #007acc;
}

.paste-btn:hover {
    background-color: #e3f2fd;
    border-color: #007acc;
}

.smart-paste-section {
    margin-bottom: 20px;
}

.paste-instructions {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.paste-instructions h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.paste-instructions p {
    margin: 0 0 10px 0;
    color: #666;
}

.paste-instructions ul {
    margin: 0;
    padding-left: 20px;
}

.paste-instructions li {
    margin-bottom: 5px;
    color: #666;
}

.paste-input-area {
    margin-bottom: 20px;
}

#smart-paste-input {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

#smart-paste-input:focus {
    outline: none;
    border-color: #007acc;
    border-style: solid;
}

.paste-buttons {
    margin-top: 10px;
    text-align: center;
}

.paste-preview-area {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #007acc;
}

.paste-preview-area h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.paste-preview-content {
    background-color: white;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    max-height: 300px;
    overflow-y: auto;
}

.paste-preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.paste-preview-content a {
    color: #007acc;
    text-decoration: none;
}

.paste-preview-content a:hover {
    text-decoration: underline;
}

/* URL Preview in paste preview */
.url-preview {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    background-color: #fafafa;
}

.url-preview .url-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.url-preview .url-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.url-preview .url-link {
    color: #007acc;
    font-size: 12px;
    text-decoration: none;
}

.url-preview .url-link:hover {
    text-decoration: underline;
}

/* Column AI Modal Styles */
#column-ai-modal .info-display {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
    font-family: monospace;
}

#column-ai-modal .info-display strong {
    color: #2196F3;
}

#column-ai-modal .max-480 {
    max-width: 480px;
}

/* Card AI Modal Info Display */
#ai-card-info {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
    font-family: monospace;
}

#ai-card-info strong {
    color: #2196F3;
    display: block;
    margin-bottom: 4px;
}

#ai-card-column {
    color: #666;
    font-size: 0.9em;
}

/* AI Notification animations */
.ai-notification {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
