/* AI Content Service Modal - Modern Design */

.ai-content-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ai-content-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.ai-content-modal__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.25s ease-out;
}

/* Modal header styling to match panel titles */
.ai-content-modal__header {
    background-color: #f9f9f9;
    border-top-left-radius: 0.625rem;
    border-top-right-radius: 0.625rem;
    font-weight: normal;
    margin: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 1.25rem;
    padding: 0.9375rem;
}

.ai-content-modal__header .remove {
    color: #2c2c2c;
    margin-left: auto;
    text-decoration: none;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.15s ease;
}

.ai-content-modal__header .remove:hover {
    color: #000;
    background-color: #e9ecef;
}

/* Modal body - with scrollbars */
.ai-content-modal__body {
    overflow-y: auto;
    flex: 1;
    padding: 1.5rem;
    background-color: #eee;
}


.ai-content-modal .generate-status {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 2.125rem; /* Match button height */
}

.ai-content-modal .generate-status__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #888;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.ai-content-modal .generate-status__text {
    color: #555;
    font-weight: 500;
    font-size: 13px;
    margin: 0;
}

.ai-content-modal .panel__content {
    padding: 1.875rem .9375rem 1.25rem;
}

.ai-content-modal .tab-content p {
    margin-bottom: .1875rem;
    font-weight: normal;
    color: #333;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-content-modal .regenerate-btn { display: inline-flex; align-items: center; }
.ai-content-modal .regenerate-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.ai-content-modal .content-field__textarea {
    width: 100%;
    min-height: 80px;
    padding: 15px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    background: white;
    color: #2c3e50;
    line-height: 1.6;
    overflow: hidden;
    height: auto;
}

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

/* Tab content */
.ai-content-modal .tab-content {
    display: none;
}

.ai-content-modal .tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 10001;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.notification.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.notification.error {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.notification.info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .ai-content-modal__content {
        width: 98%;
        max-height: 98vh;
        border-radius: 15px;
    }
    
}

/* Scrollbar Styling - For modal body area */
.ai-content-modal__body::-webkit-scrollbar {
    width: 8px;
}

.ai-content-modal__body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ai-content-modal__body::-webkit-scrollbar-thumb {
    background: #c9c9c9;
    border-radius: 4px;
}

.ai-content-modal__body::-webkit-scrollbar-thumb:hover {
    background: #b5b5b5;
}
