/* ════ AI REWRITE PREMIUM STYLES ════ */

.ai-rewrite-dialog {
    width: 90%;
    max-width: 480px;
    background: var(--card);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: aiDialogPopup 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

@keyframes aiDialogPopup {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ai-rewrite-header {
    margin-bottom: 20px;
}

.ai-rewrite-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px 0;
}

.ai-rewrite-header p {
    font-size: 14px;
    color: var(--dim);
    margin: 0;
}

.ai-settings-trigger {
    padding: 10px;
    opacity: 0.6;
    transition: all 0.2s;
}

.ai-settings-trigger:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
}

.ai-rewrite-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Custom Scrollbar for list */
.ai-rewrite-list::-webkit-scrollbar {
    width: 4px;
}

.ai-rewrite-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.ai-style-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-style-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.1);
}

.ai-style-card.selected {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: var(--primary);
}

.ai-style-icon {
    font-size: 22px;
    width: 44px;
    height: 44px;
    background: var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-style-card.selected .ai-style-icon {
    background: var(--primary);
    color: var(--text);
}

.ai-style-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ai-style-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.ai-style-desc {
    font-size: 12px;
    color: var(--dim);
    line-height: 1.3;
}

.ai-style-check {
    color: var(--primary);
    font-size: 16px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
}

.ai-style-card.selected .ai-style-check {
    opacity: 1;
    transform: scale(1);
}

/* Custom Prompt */
.ai-custom-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #fff;
    padding: 14px;
    font-size: 14px;
    outline: none;
    resize: none;
    height: 90px;
    transition: all 0.2s;
}

.ai-custom-textarea:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
}

/* Title Gen Row */
.ai-title-gen-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 18px;
    border-radius: 18px;
    cursor: pointer;
    margin-bottom: 24px;
}

.ai-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ai-checkbox i {
    font-size: 12px;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
}

.ai-title-gen-row.active .ai-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.ai-title-gen-row.active .ai-checkbox i {
    opacity: 1;
    transform: scale(1);
}

/* Actions */
.ai-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.ai-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: none;
    padding: 12px 24px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-btn-apply {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3);
    transition: all 0.2s;
}

.ai-btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(var(--primary-rgb), 0.4);
}

/* Settings Specific */
.ai-rewrite-dialog.settings {
    max-width: 420px;
}

.ai-settings-body {
    margin-bottom: 24px;
}

.ai-settings-label {
    display: block;
    font-size: 13px;
    color: var(--dim);
    margin-bottom: 10px;
    font-weight: 600;
}

.ai-settings-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--text);
    padding: 14px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
}

.ai-settings-input:focus {
    border-color: var(--primary);
}

.ai-settings-help {
    font-size: 12px;
    color: var(--dim);
    margin-top: 12px;
    line-height: 1.5;
}

.ai-settings-help a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}